dependabot-python 0.129.1 → 0.130.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19f3bb2e09c6382bad30db25967e30d6d603fbdbaaf46fc0053df682376b0da6
4
- data.tar.gz: 91aaccfeacbd37a2477146c3a77eeca07a32050bf78ab44c4e0ca75418735abc
3
+ metadata.gz: 8e0193b378b53e0051352322735709d88b8dc54418b5ab706bb51de8d5e6b0af
4
+ data.tar.gz: 36ce6abd5a793c3d325fe868a634ec9e2cf5117337a19946cbfd70af524f74fa
5
5
  SHA512:
6
- metadata.gz: a65490c76e950b268c885f832c5ce7a0b25ba4076cf70cca7c72ed0716c956edba98ab4accb54b38ba16642d1caa7b043e2546523fc4bbd43f5585ea5d8bba89
7
- data.tar.gz: 259bb03c177d36e2a722144b3729ff770e3e63124bbb28642e9075c0fc44cb674511c46a1a522daf38955a35f45b5d523910669cb93cf10d3214464c4dcd92e5
6
+ metadata.gz: 6b0aeb8a14889b8e2070f52e36ee1dc3bab520c3c48e8136ff5ae85a973f9393db44676a70d25768e398c687226e60fd119d4410baf20109bae67f1700c91dc2
7
+ data.tar.gz: c21e05e95f67eb0a53994677f925184ed4ebf6d371bc0940baa3712fc608d8e6ae9b2767f407ea80034ed85a4068b96224f73f3702e79b9bb03c1beda3d4a05b
@@ -1,9 +1,9 @@
1
1
  import hashin
2
2
  import json
3
3
  import pipfile
4
- from poetry.poetry import Poetry
5
4
  from poetry.factory import Factory
6
5
 
6
+
7
7
  def get_dependency_hash(dependency_name, dependency_version, algorithm):
8
8
  hashes = hashin.get_package_hashes(
9
9
  dependency_name,
@@ -11,14 +11,16 @@ def get_dependency_hash(dependency_name, dependency_version, algorithm):
11
11
  algorithm=algorithm
12
12
  )
13
13
 
14
- return json.dumps({ "result": hashes["hashes"] })
14
+ return json.dumps({"result": hashes["hashes"]})
15
+
15
16
 
16
17
  def get_pipfile_hash(directory):
17
18
  p = pipfile.load(directory + '/Pipfile')
18
19
 
19
- return json.dumps({ "result": p.hash })
20
+ return json.dumps({"result": p.hash})
21
+
20
22
 
21
23
  def get_pyproject_hash(directory):
22
24
  p = Factory().create_poetry(directory)
23
25
 
24
- return json.dumps({ "result": p.locker._get_content_hash() })
26
+ return json.dumps({"result": p.locker._get_content_hash()})
@@ -1,28 +1,26 @@
1
- from itertools import chain
2
1
  import glob
3
2
  import io
4
3
  import json
5
- import optparse
6
4
  import os.path
7
5
  import re
8
6
 
9
7
  import setuptools
10
8
  import pip._internal.req.req_file
11
9
  from pip._internal.network.session import PipSession
12
- from pip._internal.models.format_control import FormatControl
13
10
  from pip._internal.req.constructors import (
14
- install_req_from_line,
15
- install_req_from_parsed_requirement,
11
+ install_req_from_line,
12
+ install_req_from_parsed_requirement,
16
13
  )
17
14
 
15
+
18
16
  def parse_requirements(directory):
19
17
  # Parse the requirements.txt
20
18
  requirement_packages = []
21
19
  requirement_files = glob.glob(os.path.join(directory, '*.txt')) \
22
- + glob.glob(os.path.join(directory, '**', '*.txt'))
20
+ + glob.glob(os.path.join(directory, '**', '*.txt'))
23
21
 
24
22
  pip_compile_files = glob.glob(os.path.join(directory, '*.in')) \
25
- + glob.glob(os.path.join(directory, '**', '*.in'))
23
+ + glob.glob(os.path.join(directory, '**', '*.in'))
26
24
 
27
25
  def version_from_install_req(install_req):
28
26
  if install_req.is_pinned:
@@ -52,10 +50,11 @@ def parse_requirements(directory):
52
50
  "extras": sorted(list(install_req.extras))
53
51
  })
54
52
  except Exception as e:
55
- print(json.dumps({ "error": repr(e) }))
53
+ print(json.dumps({"error": repr(e)}))
56
54
  exit(1)
57
55
 
58
- return json.dumps({ "result": requirement_packages })
56
+ return json.dumps({"result": requirement_packages})
57
+
59
58
 
60
59
  def parse_setup(directory):
61
60
  # Parse the setup.py
@@ -99,6 +98,7 @@ def parse_setup(directory):
99
98
  return []
100
99
 
101
100
  global fake_open
101
+
102
102
  def fake_open(*args, **kwargs):
103
103
  content = ("VERSION = ('0', '0', '1+dependabot')\n"
104
104
  "__version__ = '0.0.1+dependabot'\n"
@@ -135,4 +135,4 @@ def parse_setup(directory):
135
135
  # Exec the setup.py
136
136
  exec(content) in globals(), locals()
137
137
 
138
- return json.dumps({ "result": setup_packages })
138
+ return json.dumps({"result": setup_packages})
@@ -1,5 +1,6 @@
1
1
  pip==20.3.3
2
2
  pip-tools==5.4.0
3
+ flake8==3.8.4
3
4
  hashin==0.15.0
4
5
  pipenv==2018.11.26
5
6
  pipfile==0.0.2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-python
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.129.1
4
+ version: 0.130.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-21 00:00:00.000000000 Z
11
+ date: 2021-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dependabot-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.129.1
19
+ version: 0.130.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.129.1
26
+ version: 0.130.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.6.0
103
+ version: 1.8.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.6.0
110
+ version: 1.8.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.20.0
117
+ version: 0.21.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.20.0
124
+ version: 0.21.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: simplecov-console
127
127
  requirement: !ruby/object:Gem::Requirement