@@ -16,11 +16,10 @@ def get_version(*file_paths):
1616 """
1717 filename = os .path .join (os .path .dirname (__file__ ), * file_paths )
1818 version_file = open (filename ).read ()
19- version_match = re .search (r"^__version__ = ['\"]([^'\"]*)['\"]" ,
20- version_file , re .M )
19+ version_match = re .search (r"^__version__ = ['\"]([^'\"]*)['\"]" , version_file , re .M )
2120 if version_match :
2221 return version_match .group (1 )
23- raise RuntimeError (' Unable to find version string.' )
22+ raise RuntimeError (" Unable to find version string." )
2423
2524
2625def load_requirements (* requirements_paths ):
@@ -33,7 +32,8 @@ def load_requirements(*requirements_paths):
3332 requirements = set ()
3433 for path in requirements_paths :
3534 requirements .update (
36- line .split ('#' )[0 ].strip () for line in open (path ).readlines ()
35+ line .split ("#" )[0 ].strip ()
36+ for line in open (path ).readlines ()
3737 if is_requirement (line .strip ())
3838 )
3939 return list (requirements )
@@ -47,64 +47,65 @@ def is_requirement(line):
4747 bool: True if the line is not blank, a comment, a URL, or an included file
4848 """
4949 return not (
50- line == '' or
51- line .startswith ('-r' ) or
52- line .startswith ('#' ) or
53- line .startswith ('-e' ) or
54- line .startswith (' git+' ) or
55- line .startswith ('-c' )
50+ line == ""
51+ or line .startswith ("-r" )
52+ or line .startswith ("#" )
53+ or line .startswith ("-e" )
54+ or line .startswith (" git+" )
55+ or line .startswith ("-c" )
5656 )
5757
5858
59- VERSION = get_version (' code_annotations' , ' __init__.py' )
59+ VERSION = get_version (" code_annotations" , " __init__.py" )
6060
61- if sys .argv [- 1 ] == ' tag' :
61+ if sys .argv [- 1 ] == " tag" :
6262 print ("Tagging the version on github:" )
6363 os .system ("git tag -a %s -m 'version %s'" % (VERSION , VERSION ))
6464 os .system ("git push --tags" )
6565 sys .exit ()
6666
67- README = open (os .path .join (os .path .dirname (__file__ ), ' README.rst' )).read ()
68- CHANGELOG = open (os .path .join (os .path .dirname (__file__ ), ' CHANGELOG.rst' )).read ()
67+ README = open (os .path .join (os .path .dirname (__file__ ), " README.rst" )).read ()
68+ CHANGELOG = open (os .path .join (os .path .dirname (__file__ ), " CHANGELOG.rst" )).read ()
6969
7070setup (
71- name = ' code-annotations' ,
71+ name = " code-annotations" ,
7272 version = VERSION ,
7373 description = """Extensible tools for parsing annotations in codebases""" ,
74- long_description = README + ' \n \n ' + CHANGELOG ,
75- long_description_content_type = ' text/x-rst' ,
76- author = ' edX' ,
77- 78- url = ' https://github.com/openedx/code-annotations' ,
74+ long_description = README + " \n \n " + CHANGELOG ,
75+ long_description_content_type = " text/x-rst" ,
76+ author = " edX" ,
77+ 78+ url = " https://github.com/openedx/code-annotations" ,
7979 packages = [
80- ' code_annotations' ,
80+ " code_annotations" ,
8181 ],
8282 entry_points = {
83- ' console_scripts' : [
84- ' code_annotations = code_annotations.cli:entry_point' ,
83+ " console_scripts" : [
84+ " code_annotations = code_annotations.cli:entry_point" ,
8585 ],
86- ' annotation_finder.searchers' : [
87- ' javascript = code_annotations.extensions.javascript:JavascriptAnnotationExtension' ,
88- ' python = code_annotations.extensions.python:PythonAnnotationExtension' ,
86+ " annotation_finder.searchers" : [
87+ " javascript = code_annotations.extensions.javascript:JavascriptAnnotationExtension" ,
88+ " python = code_annotations.extensions.python:PythonAnnotationExtension" ,
8989 ],
9090 },
9191 include_package_data = True ,
92- install_requires = load_requirements (' requirements/base.in' ),
92+ install_requires = load_requirements (" requirements/base.in" ),
9393 extras_require = {"django" : ["Django>=4.2" ]},
9494 license = "Apache Software License 2.0" ,
9595 zip_safe = False ,
96- keywords = ' edx pii code annotations' ,
96+ keywords = " edx pii code annotations" ,
9797 python_requires = ">=3.11" ,
9898 classifiers = [
99- 'Development Status :: 3 - Alpha' ,
100- 'Framework :: Django' ,
101- 'Framework :: Django :: 4.2' ,
102- 'Intended Audience :: Developers' ,
103- 'License :: OSI Approved :: Apache Software License' ,
104- 'Natural Language :: English' ,
105- 'Programming Language :: Python' ,
106- 'Programming Language :: Python :: 3' ,
107- 'Programming Language :: Python :: 3.11' ,
108- 'Programming Language :: Python :: 3.12' ,
99+ "Development Status :: 3 - Alpha" ,
100+ "Framework :: Django" ,
101+ "Framework :: Django :: 4.2" ,
102+ "Framework :: Django :: 5.2" ,
103+ "Intended Audience :: Developers" ,
104+ "License :: OSI Approved :: Apache Software License" ,
105+ "Natural Language :: English" ,
106+ "Programming Language :: Python" ,
107+ "Programming Language :: Python :: 3" ,
108+ "Programming Language :: Python :: 3.11" ,
109+ "Programming Language :: Python :: 3.12" ,
109110 ],
110111)
0 commit comments