Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5a62f05

Browse files
mindwgsnedders
authored andcommitted
Import things from os.path to make setup.py more readable
1 parenta8a10d6 commit5a62f05

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
importast
2-
importos
32
importcodecs
43

4+
fromos.pathimportjoin,dirname
55
fromsetuptoolsimportsetup,find_packages
66

77

@@ -22,13 +22,13 @@
2222
'Topic :: Text Processing :: Markup :: HTML'
2323
]
2424

25-
current_dir=os.path.dirname(__file__)
26-
withcodecs.open(os.path.join(current_dir,'README.rst'),'r','utf8')asreadme_file:
27-
withcodecs.open(os.path.join(current_dir,'CHANGES.rst'),'r','utf8')aschanges_file:
25+
here=dirname(__file__)
26+
withcodecs.open(join(here,'README.rst'),'r','utf8')asreadme_file:
27+
withcodecs.open(join(here,'CHANGES.rst'),'r','utf8')aschanges_file:
2828
long_description=readme_file.read()+'\n'+changes_file.read()
2929

3030
version=None
31-
withopen(os.path.join("html5lib","__init__.py"),"rb")asinit_file:
31+
withopen(join("html5lib","__init__.py"),"rb")asinit_file:
3232
t=ast.parse(init_file.read(),filename="__init__.py",mode="exec")
3333
assertisinstance(t,ast.Module)
3434
assignments=filter(lambdax:isinstance(x,ast.Assign),t.body)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp