Skip to content
Open
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 .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
exclude = .git, .eggs, __pycache__, build, dist, docs, docker, migrations
ignore = E129, E402, F841, W504 E128
ignore = E129, E402, F841, W504 E128 , W503, E203
max-line-length = 130
9 changes: 3 additions & 6 deletions etc/scripts/fetch_thirdparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
metavar="DIR",
default=utils_thirdparty.THIRDPARTY_DIR,
show_default=True,
help="Path to the detsination directory where to save downloaded wheels, "
"sources, ABOUT and LICENSE files..",
help="Path to the detsination directory where to save downloaded wheels, " "sources, ABOUT and LICENSE files..",
)
@click.option(
"-w",
Expand Down Expand Up @@ -107,8 +106,7 @@
@click.option(
"--use-cached-index",
is_flag=True,
help="Use on disk cached PyPI indexes list of packages and versions and "
"do not refetch if present.",
help="Use on disk cached PyPI indexes list of packages and versions and " "do not refetch if present.",
)
@click.option(
"--sdist-only",
Expand Down Expand Up @@ -186,8 +184,7 @@ def fetch_thirdparty(
print(f"COLLECTING REQUIRED NAMES & VERSIONS FROM {dest_dir}")

existing_packages_by_nv = {
(package.name, package.version): package
for package in utils_thirdparty.get_local_packages(directory=dest_dir)
(package.name, package.version): package for package in utils_thirdparty.get_local_packages(directory=dest_dir)
}

required_name_versions = set(existing_packages_by_nv.keys())
Expand Down
11 changes: 2 additions & 9 deletions etc/scripts/gen_pypi_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@ def from_file(cls, name, index_dir, archive_file):
)

def simple_index_entry(self, base_url):
return (
f' <a href="{base_url}/{self.archive_file.name}#sha256={self.checksum}">'
f"{self.archive_file.name}</a><br/>"
)
return f' <a href="{base_url}/{self.archive_file.name}#sha256={self.checksum}">' f"{self.archive_file.name}</a><br/>"


def build_pypi_index(directory, base_url="https://thirdparty.aboutcode.org/pypi"):
Expand Down Expand Up @@ -204,11 +201,7 @@ def build_pypi_index(directory, base_url="https://thirdparty.aboutcode.org/pypi"
for pkg_file in directory.iterdir():
pkg_filename = pkg_file.name

if (
not pkg_file.is_file()
or not pkg_filename.endswith(dist_exts)
or pkg_filename.startswith(".")
):
if not pkg_file.is_file() or not pkg_filename.endswith(dist_exts) or pkg_filename.startswith("."):
continue

pkg_name = get_package_name_from_filename(
Expand Down
3 changes: 1 addition & 2 deletions etc/scripts/gen_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ def gen_requirements():
type=pathlib.Path,
required=True,
metavar="DIR",
help="Path to the 'site-packages' directory where wheels are installed "
"such as lib/python3.12/site-packages",
help="Path to the 'site-packages' directory where wheels are installed " "such as lib/python3.12/site-packages",
)
parser.add_argument(
"-r",
Expand Down
6 changes: 2 additions & 4 deletions etc/scripts/gen_requirements_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def gen_dev_requirements():
type=pathlib.Path,
required=True,
metavar="DIR",
help="Path to the 'site-packages' directory where wheels are installed "
"such as lib/python3.12/site-packages",
help="Path to the 'site-packages' directory where wheels are installed " "such as lib/python3.12/site-packages",
)
parser.add_argument(
"-d",
Expand All @@ -52,8 +51,7 @@ def gen_dev_requirements():
type=pathlib.Path,
default="requirements.txt",
metavar="FILE",
help="Path to the main requirements file. Its requirements will be excluded "
"from the generated dev requirements.",
help="Path to the main requirements file. Its requirements will be excluded " "from the generated dev requirements.",
)
args = parser.parse_args()

Expand Down
5 changes: 1 addition & 4 deletions etc/scripts/test_utils_pypi_supported_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ def validate_wheel_filename_for_pypi(filename):
"macosx_10_15_arm64",
"macosx_11_10_universal2",
# A real tag used by e.g. some numpy wheels
(
"macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64."
"macosx_10_10_intel.macosx_10_10_x86_64"
),
("macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64." "macosx_10_10_intel.macosx_10_10_x86_64"),
],
)
def test_is_valid_pypi_wheel_return_true_for_supported_wheel(plat):
Expand Down
4 changes: 1 addition & 3 deletions etc/scripts/update_skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ def update_skeleton_files(repo_names=ABOUTCODE_PUBLIC_REPO_NAMES):
os.chdir(work_dir_path / repo_name)

# Add skeleton as an origin
subprocess.run(
["git", "remote", "add", "skeleton", "git@github.com:aboutcode-org/skeleton.git"]
)
subprocess.run(["git", "remote", "add", "skeleton", "git@github.com:aboutcode-org/skeleton.git"])

# Fetch skeleton files
subprocess.run(["git", "fetch", "skeleton"])
Expand Down
Loading
Loading