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

ruff recommended code changes from #174 #175

Merged
merged 1 commit into from
Jul 10, 2023
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
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
"""Docstring to fix pydocstyle D100 Missing docstring in public module."""

import os.path
import sys
Expand Down
1 change: 1 addition & 0 deletions src/wily/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import traceback
from pathlib import Path
from sys import exit

import click

Expand Down
1 change: 1 addition & 0 deletions src/wily/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import multiprocessing
import os
import pathlib
from sys import exit

from progress.bar import Bar

Expand Down
1 change: 1 addition & 0 deletions src/wily/commands/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import multiprocessing
import os
from pathlib import Path
from sys import exit

import radon.cli.harvest
import tabulate
Expand Down
10 changes: 5 additions & 5 deletions src/wily/commands/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ def graph(
name=f"{path}",
ids=state.index[state.default_archiver].revision_keys,
text=labels,
marker=dict(
size=0 if z_axis is None else z,
color=list(range(len(y))),
# colorscale='Viridis',
),
marker={
"size": 0 if z_axis is None else z,
"color": list(range(len(y))),
# "colorscale": "Viridis",
},
xcalendar="gregorian",
hoveron="points+fills",
)
Expand Down
1 change: 1 addition & 0 deletions src/wily/commands/rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import operator as op
import os
from pathlib import Path
from sys import exit

import radon.cli.harvest
import tabulate
Expand Down
2 changes: 1 addition & 1 deletion src/wily/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from functools import lru_cache
from typing import Any, List

import wily.operators as operators
from wily import operators
from wily.archivers import ARCHIVER_GIT

logger = logging.getLogger(__name__)
Expand Down
3 changes: 1 addition & 2 deletions src/wily/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
from dataclasses import asdict, dataclass
from typing import List

import wily.cache as cache
from wily import logger
from wily import cache, logger
from wily.archivers import Revision, resolve_archiver
from wily.operators import get_metric

Expand Down
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def gitdir(tmpdir):
foo = 1
def function1():
a = 1 + 1

class Class1(object):
def method(self):
b = 1 + 5
Expand Down
2 changes: 1 addition & 1 deletion test/integration/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def test_build_no_git_history(tmpdir):
assert result.exit_code == 1, result.stdout


archivers = {name for name in ALL_ARCHIVERS.keys()}
archivers = set(ALL_ARCHIVERS)


@pytest.mark.parametrize("archiver", archivers)
Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_archivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import pytest

import wily.archivers
import wily.archivers.git as git
import wily.config
from wily.archivers import git


class MockAuthor:
Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_build_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import pytest

import wily.commands.build as build
from wily.archivers import Archiver, BaseArchiver, Revision
from wily.commands import build
from wily.config import DEFAULT_CONFIG
from wily.operators import BaseOperator, Operator, OperatorLevel

Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import pytest

import wily.cache as cache
from wily import cache
from wily.archivers import Revision
from wily.config import ARCHIVER_GIT, DEFAULT_CONFIG

Expand Down