Skip to content

Commit

Permalink
Update requirements.txt, reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
thatch committed Dec 7, 2023
1 parent 9536039 commit 98f331a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion bumpreqs/core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from typing import List, Optional, Union
from typing import List, Optional

import requests

Expand Down
3 changes: 2 additions & 1 deletion bumpreqs/marker_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
">=": "<",
}


# This is largely patterend after packaging/markers.py:_evaluate_markers
# The tuple is e.g. ("python_version", ">=", "3.0") and the version will always
# be the last item.
Expand Down Expand Up @@ -48,7 +49,7 @@ def extract_python(markers: Optional[Marker]) -> Optional[VersionIntervals]:
if markers is None:
return None

for (var, op, value) in _extract_python_internal(markers._markers):
for var, op, value in _extract_python_internal(markers._markers):
vi = vi.intersect(VersionIntervals.from_str(f"{op}{value}"))

if vi == allow_all:
Expand Down
8 changes: 3 additions & 5 deletions bumpreqs/vrange.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ def intersect(self, other: VersionIntervals) -> VersionIntervals:

@classmethod
def _intersect(self, other: EventList) -> EventList:

new_events: EventList = []
state = 0
# Need "OUT" handled before "IN"
for (v, ev) in sorted(other, key=lambda i: (i[0], i[1])):
for v, ev in sorted(other, key=lambda i: (i[0], i[1])):
old_state = state
state += ev
if state == 2:
Expand All @@ -140,11 +139,10 @@ def union(self, other: VersionIntervals) -> VersionIntervals:

@classmethod
def _union(self, other: EventList) -> EventList:

new_events: EventList = []
state = 0
# Need "OUT" handled before "IN"
for (v, ev) in sorted(other, key=lambda i: (i[0], i[1])):
for v, ev in sorted(other, key=lambda i: (i[0], i[1])):
old_state = state
state += ev
if state >= 1:
Expand All @@ -164,7 +162,7 @@ def __str__(self) -> str:
if self._events == []:
return "NONE"

for (v, ev) in self._events:
for v, ev in self._events:
if (ev == IN and v == MIN) or (ev == OUT and v == MAX):
continue

Expand Down
18 changes: 9 additions & 9 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
black==22.8.0
coverage==6.4.4
flake8==5.0.4
mypy==0.971
tox==3.25.1
twine==4.0.1
ufmt==2.0.0
usort==1.0.4
black==23.11.0
coverage==7.3.2
flake8==6.1.0
mypy==1.7.1
tox==4.11.4
twine==4.0.2
ufmt==2.3.0
usort==1.0.7
volatile==2.1.0
wheel==0.37.1
wheel==0.42.0
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
click==8.1.3
requests==2.28.1
packaging==21.3
click==8.1.7
requests==2.31.0
packaging==23.2
moreorless==0.4.0

0 comments on commit 98f331a

Please sign in to comment.