Skip to content

Commit

Permalink
chore: cleanup after rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Oct 20, 2024
1 parent 46f52cc commit 64ab44a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 22 deletions.
4 changes: 1 addition & 3 deletions nox/_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ def format_dependency(self, dependency: str) -> str:
msg = "Cannot parametrize requires with {python} when python is None or a bool."
raise ValueError(msg)
return formatted
msg = (
"The requires of a not-yet-parametrized session cannot be parametrized."
) # pragma: no cover
msg = "The requires of a not-yet-parametrized session cannot be parametrized." # pragma: no cover
raise TypeError(msg) # pragma: no cover


Expand Down
3 changes: 1 addition & 2 deletions nox/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ def session_decorator(
*,
default: bool = ...,
requires: Sequence[str] | None = ...,
) -> Callable[[F], F]:
...
) -> Callable[[F], F]: ...


def session_decorator(
Expand Down
15 changes: 0 additions & 15 deletions tests/resources/noxfile_requires.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ def h(session):
print(session.name)


#


@nox.session(requires=["j"])
def i(session):
print(session.name)
Expand All @@ -70,9 +67,6 @@ def j(session):
print(session.name)


#


@nox.session(python=["3.9", "3.10"])
def k(session):
print(session.name)
Expand All @@ -88,17 +82,11 @@ def n(session):
print(session.name)


#


@nox.session(requires=["does_not_exist"])
def o(session):
print(session.name)


#


@nox.session(python=["3.9", "3.10"])
def p(session):
print(session.name)
Expand All @@ -109,9 +97,6 @@ def q(session):
print(session.name)


#


@nox.session
def r(session):
print(session.name)
Expand Down
4 changes: 2 additions & 2 deletions tests/test__parametrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def test_generate_calls_ids():


def test_generate_calls_tags():
f = mock.Mock(should_warn={}, tags=[])
f = mock.Mock(should_warn={}, tags=[], requires=[])
f.__name__ = "f"

arg_names = ("foo",)
Expand All @@ -267,7 +267,7 @@ def test_generate_calls_tags():


def test_generate_calls_merge_tags():
f = mock.Mock(should_warn={}, tags=["tag1", "tag2"])
f = mock.Mock(should_warn={}, tags=["tag1", "tag2"], requires=[])
f.__name__ = "f"

arg_names = ("foo",)
Expand Down

0 comments on commit 64ab44a

Please sign in to comment.