Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added literal syntax to create the data structure #1813

Merged
merged 1 commit into from
Apr 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion workers/deps_libyear_worker/libyear_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def find(name, path):
def get_parsed_deps(path):

deps_file = None
dependency_list = list()
dependency_list = []

for f in file_list:
deps_file = find(f, path)
Expand Down
2 changes: 1 addition & 1 deletion workers/deps_libyear_worker/npm_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json

def map_dependencies(dict, key, type):
deps = list()
deps = []
if not dict:
return []
for name, info in dict[key].items():
Expand Down
10 changes: 5 additions & 5 deletions workers/deps_libyear_worker/pypi_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def find(name, path):
def parse_requirement_txt(file_handle):

manifest= file_handle.read()
deps=list()
deps=[]
for line in manifest.split('\n'):
matches = require_regrex.search(line.replace("'",""))
if not matches:
Expand All @@ -65,7 +65,7 @@ def map_dependencies(info):


def map_dependencies_pipfile(packages, type):
deps = list()
deps = []
if not packages:
return []
for name, info in packages.items():
Expand All @@ -81,7 +81,7 @@ def parse_pipfile(file_handle):

def parse_pipfile_lock(file_object):
manifest = json.load(file_object)
deps = list()
deps = []
for group,dependencies in manifest.items():

if group == "_meta":
Expand All @@ -98,7 +98,7 @@ def parse_pipfile_lock(file_object):
def parse_setup_py(file_handle):
manifest= file_handle.read()

deps = list()
deps = []

# for single_line in manifest:
# matchh = re.match(INSTALL_REGEXP, manifest)
Expand Down Expand Up @@ -135,7 +135,7 @@ def parse_poetry(file_handle):

def parse_poetry_lock(file_handle):
manifest = toml.load(file_handle)
deps = list()
deps = []
group = 'runtime'
for package in manifest['package']:
req = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

files = glob.glob('%s/generate*.py' % os.path.dirname(__file__))

__all__ = list()
__all__ = []

for f in files:
if os.path.isfile(f):
Expand Down