update to flat eslint config

This commit is contained in:
AJ Slater 2024-02-16 18:27:29 -08:00
parent 39fe7c8f79
commit 9ccd8957bb
8 changed files with 2376 additions and 5068 deletions

13
.eslintignore Normal file
View File

@ -0,0 +1,13 @@
!.circleci
**/__pycache__
*test-results*
*~
.git
.mypy_cache
.pytest_cache
.ruff_cache
.venv
dist
node_modules
package-lock.json
typings

View File

@ -1,101 +0,0 @@
module.exports = {
root: true,
env: {
browser: true,
es2022: true,
node: true,
},
extends: [
"eslint:recommended",
// LANGS
"plugin:json/recommended",
"plugin:mdx/recommended",
"plugin:yaml/recommended",
// CODE QUALITY
"plugin:sonarjs/recommended",
"plugin:unicorn/all",
// PRACTICES
"plugin:array-func/recommended",
"plugin:eslint-comments/recommended",
"plugin:no-use-extend-native/recommended",
"plugin:optimize-regex/all",
"plugin:promise/recommended",
"plugin:import/recommended",
"plugin:switch-case/recommended",
// PRETTIER
"plugin:prettier/recommended",
"prettier", // prettier-config
// SECURITY
"plugin:no-unsanitized/DOM",
"plugin:security/recommended-legacy",
],
overrides: [
{
files: ["*.md"],
rules: {
"prettier/prettier": ["warn", { parser: "markdown" }],
},
},
],
parserOptions: {
ecmaVersion: "latest",
ecmaFeatures: {
impliedStrict: true,
},
},
plugins: [
"array-func",
"eslint-comments",
"json",
"import",
"no-constructor-bind",
"no-secrets",
"no-unsanitized",
"no-use-extend-native",
"optimize-regex",
"prettier",
"promise",
"simple-import-sort",
"switch-case",
"security",
"sonarjs",
"unicorn",
"yaml",
],
rules: {
"array-func/prefer-array-from": "off", // for modern browsers the spread operator, as preferred by unicorn, works fine.
"max-params": ["warn", 4],
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-constructor-bind/no-constructor-bind": "error",
"no-constructor-bind/no-constructor-state": "error",
"no-secrets/no-secrets": "error",
"eslint-comments/no-unused-disable": 1,
"prettier/prettier": "warn",
"security/detect-object-injection": "off",
"simple-import-sort/exports": "warn",
"simple-import-sort/imports": "warn",
"space-before-function-paren": "off",
"switch-case/newline-between-switch-case": "off", // Malfunctioning
"unicorn/switch-case-braces": ["warn", "avoid"],
"unicorn/prefer-node-protocol": 0,
"unicorn/prevent-abbreviations": "off",
"unicorn/filename-case": [
"error",
{ case: "kebabCase", ignore: [".*.md"] },
],
},
ignorePatterns: [
"*~",
"**/__pycache__",
".git",
"!.circleci",
".mypy_cache",
".pytest_cache",
".venv*",
"dist",
"package-lock.json",
"test-results",
"typings",
],
};

View File

@ -4,6 +4,8 @@ An API and CLI for extracting structured comic metadata from filenames.
## Install
<!-- eslint-skip -->
```sh
pip install comicfn2dict
```
@ -14,6 +16,8 @@ look at `comicfn2dict/comicfn2dict.py`
## CLI
<!-- eslint-skip -->
```sh
comicfn2dict "Series Name #01 - Title (2023).cbz"
{'ext': 'cbz',

186
eslint.config.js Normal file
View File

@ -0,0 +1,186 @@
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import arrayFunc from "eslint-plugin-array-func";
// import plugin broken for flag config
// https://github.com/import-js/eslint-plugin-import/issues/2556
// import importPlugin from "eslint-plugin-import";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import pluginSecurity from "eslint-plugin-security";
import eslintPluginUnicorn from "eslint-plugin-unicorn";
import globals from "globals";
const compat = new FlatCompat();
export default [
{
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
},
linterOptions: {
reportUnusedDisableDirectives: "warn",
},
plugins: {
// import: importPlugin,
unicorn: eslintPluginUnicorn,
},
rules: {
"array-func/prefer-array-from": "off", // for modern browsers the spread operator, as preferred by unicorn, works fine.
"max-params": ["warn", 4],
"no-console": "warn",
"no-debugger": "warn",
"no-constructor-bind/no-constructor-bind": "error",
"no-constructor-bind/no-constructor-state": "error",
"no-secrets/no-secrets": "error",
"prettier/prettier": "warn",
"security/detect-object-injection": "off",
"space-before-function-paren": "off",
"unicorn/switch-case-braces": ["warn", "avoid"],
"unicorn/prefer-node-protocol": 0,
"unicorn/prevent-abbreviations": "off",
"unicorn/filename-case": [
"error",
{ case: "kebabCase", ignore: [".*.md"] },
],
/*
...importPlugin.configs["recommended"].rules,
"import/no-unresolved": [
"error",
{
ignore: ["^[@]"],
},
],
*/
},
/*
settings: {
"import/parsers": {
espree: [".js", ".cjs", ".mjs", ".jsx"],
"@typescript-eslint/parser": [".ts"],
},
"import/resolver": {
typescript: true,
node: true,
},
},
*/
},
js.configs.recommended,
arrayFunc.configs.all,
pluginSecurity.configs.recommended,
eslintPluginPrettierRecommended,
...compat.config({
root: true,
env: {
browser: true,
es2024: true,
node: true,
},
extends: [
// LANGS
"plugin:jsonc/recommended-with-jsonc",
"plugin:markdown/recommended",
"plugin:toml/recommended",
"plugin:yml/standard",
"plugin:yml/prettier",
// CODE QUALITY
"plugin:sonarjs/recommended",
// PRACTICES
"plugin:eslint-comments/recommended",
// "plugin:import/recommended",
"plugin:no-use-extend-native/recommended",
"plugin:optimize-regex/all",
"plugin:promise/recommended",
"plugin:switch-case/recommended",
// SECURITY
"plugin:no-unsanitized/DOM",
],
overrides: [
{
files: ["**/*.md"],
processor: "markdown/markdown",
rules: {
"prettier/prettier": ["warn", { parser: "markdown" }],
},
},
{
files: ["**/*.md/*.js"], // Will match js code inside *.md files
rules: {
"no-unused-vars": "off",
"no-undef": "off",
},
},
{
files: ["**/*.md/*.sh"],
rules: {
"prettier/prettier": ["error", { parser: "sh" }],
},
},
{
files: ["*.yaml", "*.yml"],
//parser: "yaml-eslint-parser",
rules: {
"unicorn/filename-case": "off",
},
},
{
files: ["*.toml"],
//parser: "toml-eslint-parser",
rules: {
"prettier/prettier": ["error", { parser: "toml" }],
},
},
{
files: ["*.json", "*.json5", "*.jsonc"],
//parser: "jsonc-eslint-parser",
},
],
parserOptions: {
ecmaFeatures: {
impliedStrict: true,
},
ecmaVersion: "latest",
},
plugins: [
"eslint-comments",
//"import",
"markdown",
"no-constructor-bind",
"no-secrets",
"no-unsanitized",
"no-use-extend-native",
"optimize-regex",
"promise",
"simple-import-sort",
"sonarjs",
"switch-case",
"unicorn",
],
rules: {
"no-constructor-bind/no-constructor-bind": "error",
"no-constructor-bind/no-constructor-state": "error",
"no-secrets/no-secrets": "error",
"eslint-comments/no-unused-disable": 1,
"simple-import-sort/exports": "warn",
"simple-import-sort/imports": "warn",
"switch-case/newline-between-switch-case": "off", // Malfunctioning
},
ignorePatterns: [
"*~",
"**/__pycache__",
".git",
"!.circleci",
".mypy_cache",
".ruff_cache",
".pytest_cache",
".venv*",
"dist",
"node_modules",
"package-lock.json",
"test-results",
"typings",
],
}),
];

6135
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
{
"version": "0.1.0",
"description": "linting",
"version": "0.2.0",
"description": "comicfn2dict linting",
"type": "module",
"scripts": {
"fix": "eslint_d --cache --fix --ignore-pattern frontend --ext .cjs,.mjs,.js,.json,.yaml,.md . && prettier --write .",
"lint": "eslint_d --cache --ignore-pattern frontend --ext .cjs,.mjs,.js,.json,.yaml,.md . && prettier --check .",
"fix": "eslint --cache --fix . && prettier --write .",
"lint": "eslint --cache . && prettier --check .",
"remark-check": "remark .",
"remark-fix": "remark . --output"
},
@ -13,12 +13,13 @@
"@prettier/plugin-xml",
"prettier-plugin-nginx",
"prettier-plugin-packagejson",
"prettier-plugin-sh"
"prettier-plugin-sh",
"prettier-plugin-toml"
],
"overrides": [
{
"files": [
"*.md"
"**/*.md"
],
"options": {
"proseWrap": "always"
@ -28,6 +29,7 @@
},
"remarkConfig": {
"plugins": [
"gfm",
"preset-lint-consistent",
"preset-lint-recommended",
"preset-lint-markdown-style-guide",
@ -42,36 +44,37 @@
"@prettier/plugin-xml": "^3.0.0",
"eslint": "^8.34.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-array-func": "^4.0.0",
"eslint-plugin-array-func": "^5.0.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-mdx": "^3.0.0",
"eslint-plugin-jsonc": "^2.13.0",
"eslint-plugin-markdown": "^3.0.0",
"eslint-plugin-no-constructor-bind": "^2.0.4",
"eslint-plugin-no-secrets": "^0.8.9",
"eslint-plugin-no-unsanitized": "^4.0.0",
"eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-only-warn": "^1.0.2",
"eslint-plugin-optimize-regex": "^1.2.0",
"eslint-plugin-prettier": "^5.0.0-alpha.2",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-scanjs-rules": "^0.2.1",
"eslint-plugin-security": "^2.1.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-sonarjs": "^0.23.0",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-sonarjs": "^0.24.0",
"eslint-plugin-switch-case": "^1.1.2",
"eslint-plugin-unicorn": "^50.0.1",
"eslint-plugin-yaml": "^0.5.0",
"eslint-plugin-toml": "^0.9.2",
"eslint-plugin-unicorn": "^51.0.1",
"eslint-plugin-yml": "^1.12.2",
"eslint_d": "^13.0.0",
"prettier": "^3.0.0",
"prettier-plugin-nginx": "^1.0.3",
"prettier-plugin-packagejson": "^2.4.4",
"prettier-plugin-sh": "^0.14.0",
"prettier-plugin-toml": "^2.0.1",
"remark-cli": "^12.0.0",
"remark-gfm": "^4.0.0",
"remark-preset-lint-consistent": "^5.1.1",
"remark-preset-lint-markdown-style-guide": "^5.1.2",
"remark-preset-lint-recommended": "^6.1.2",
"remark-preset-prettier": "^2.0.1",
"toml": "^3.0.0"
"remark-preset-prettier": "^2.0.1"
}
}

171
poetry.lock generated
View File

@ -26,10 +26,27 @@ files = [
]
[package.extras]
dev = ["Pygments", "build", "chardet", "pre-commit", "pytest", "pytest-cov", "pytest-dependency", "ruff", "tomli", "twine"]
dev = [
"Pygments",
"build",
"chardet",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-dependency",
"ruff",
"tomli",
"twine",
]
hard-encoding-detection = ["chardet"]
toml = ["tomli"]
types = ["chardet (>=5.1.0)", "mypy", "pytest", "pytest-cov", "pytest-dependency"]
types = [
"chardet (>=5.1.0)",
"mypy",
"pytest",
"pytest-cov",
"pytest-dependency",
]
[[package]]
name = "colorama"
@ -111,12 +128,12 @@ toml = ["tomli"]
[[package]]
name = "cssbeautifier"
version = "1.14.11"
version = "1.15.1"
description = "CSS unobfuscator and beautifier."
optional = false
python-versions = "*"
files = [
{file = "cssbeautifier-1.14.11.tar.gz", hash = "sha256:40544c2b62bbcb64caa5e7f37a02df95654e5ce1bcacadac4ca1f3dc89c31513"},
{ file = "cssbeautifier-1.15.1.tar.gz", hash = "sha256:9f7064362aedd559c55eeecf6b6bed65e05f33488dcbe39044f0403c26e1c006" },
]
[package.dependencies]
@ -169,13 +186,12 @@ tqdm = ">=4.62.2,<5.0.0"
[[package]]
name = "editorconfig"
version = "0.12.3"
version = "0.12.4"
description = "EditorConfig File Locator and Interpreter for Python"
optional = false
python-versions = "*"
files = [
{file = "EditorConfig-0.12.3-py3-none-any.whl", hash = "sha256:6b0851425aa875b08b16789ee0eeadbd4ab59666e9ebe728e526314c4a2e52c1"},
{file = "EditorConfig-0.12.3.tar.gz", hash = "sha256:57f8ce78afcba15c8b18d46b5170848c88d56fd38f05c2ec60dbbfcb8996e89e"},
{ file = "EditorConfig-0.12.4.tar.gz", hash = "sha256:24857fa1793917dd9ccf0c7810a07e05404ce9b823521c7dce22a4fb5d125f80" },
]
[[package]]
@ -298,12 +314,12 @@ files = [
[[package]]
name = "jsbeautifier"
version = "1.14.11"
version = "1.15.1"
description = "JavaScript unobfuscator and beautifier."
optional = false
python-versions = "*"
files = [
{file = "jsbeautifier-1.14.11.tar.gz", hash = "sha256:6b632581ea60dd1c133cd25a48ad187b4b91f526623c4b0fb5443ef805250505"},
{ file = "jsbeautifier-1.15.1.tar.gz", hash = "sha256:ebd733b560704c602d744eafc839db60a1ee9326e30a2a80c4adb8718adc1b24" },
]
[package.dependencies]
@ -505,13 +521,13 @@ test = ["pytest"]
[[package]]
name = "pyright"
version = "1.1.349"
version = "1.1.350"
description = "Command line wrapper for pyright"
optional = false
python-versions = ">=3.7"
files = [
{file = "pyright-1.1.349-py3-none-any.whl", hash = "sha256:8f9189ddb62222a35b3525666225f1d8f24244cbff5893c42b3f001d8ebafa1a"},
{file = "pyright-1.1.349.tar.gz", hash = "sha256:af4ab7f103a0b2a92e5fbf248bf734e9a98247991350ac989ead34e97148f91c"},
{ file = "pyright-1.1.350-py3-none-any.whl", hash = "sha256:f1dde6bcefd3c90aedbe9dd1c573e4c1ddbca8c74bf4fa664dd3b1a599ac9a66" },
{ file = "pyright-1.1.350.tar.gz", hash = "sha256:a8ba676de3a3737ea4d8590604da548d4498cc5ee9ee00b1a403c6db987916c6" },
]
[package.dependencies]
@ -523,13 +539,13 @@ dev = ["twine (>=3.4.1)"]
[[package]]
name = "pytest"
version = "8.0.0"
version = "8.0.1"
description = "pytest: simple powerful testing with Python"
optional = false
python-versions = ">=3.8"
files = [
{file = "pytest-8.0.0-py3-none-any.whl", hash = "sha256:50fb9cbe836c3f20f0dfa99c565201fb75dc54c8d76373cd1bde06b06657bdb6"},
{file = "pytest-8.0.0.tar.gz", hash = "sha256:249b1b0864530ba251b7438274c4d251c58d868edaaec8762893ad4a0d71c36c"},
{ file = "pytest-8.0.1-py3-none-any.whl", hash = "sha256:3e4f16fe1c0a9dc9d9389161c127c3edc5d810c38d6793042fb81d9f48a59fca" },
{ file = "pytest-8.0.1.tar.gz", hash = "sha256:267f6563751877d772019b13aacbe4e860d73fe8f651f28112e9ac37de7513ae" },
]
[package.dependencies]
@ -541,7 +557,17 @@ pluggy = ">=1.3.0,<2.0"
tomli = { version = ">=1.0.0", markers = "python_version < \"3.11\"" }
[package.extras]
testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
testing = [
"argcomplete",
"attrs (>=19.2.0)",
"hypothesis (>=3.56)",
"mock",
"nose",
"pygments (>=2.7.2)",
"requests",
"setuptools",
"xmlschema",
]
[[package]]
name = "pytest-cov"
@ -559,7 +585,14 @@ coverage = {version = ">=5.2.1", extras = ["toml"]}
pytest = ">=4.6"
[package.extras]
testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"]
testing = [
"fields",
"hunter",
"process-tests",
"pytest-xdist",
"six",
"virtualenv",
]
[[package]]
name = "pytest-gitignore"
@ -758,45 +791,93 @@ files = [
[[package]]
name = "ruff"
version = "0.1.15"
version = "0.2.1"
description = "An extremely fast Python linter and code formatter, written in Rust."
optional = false
python-versions = ">=3.7"
files = [
{file = "ruff-0.1.15-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:5fe8d54df166ecc24106db7dd6a68d44852d14eb0729ea4672bb4d96c320b7df"},
{file = "ruff-0.1.15-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6f0bfbb53c4b4de117ac4d6ddfd33aa5fc31beeaa21d23c45c6dd249faf9126f"},
{file = "ruff-0.1.15-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e0d432aec35bfc0d800d4f70eba26e23a352386be3a6cf157083d18f6f5881c8"},
{file = "ruff-0.1.15-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9405fa9ac0e97f35aaddf185a1be194a589424b8713e3b97b762336ec79ff807"},
{file = "ruff-0.1.15-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c66ec24fe36841636e814b8f90f572a8c0cb0e54d8b5c2d0e300d28a0d7bffec"},
{file = "ruff-0.1.15-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:6f8ad828f01e8dd32cc58bc28375150171d198491fc901f6f98d2a39ba8e3ff5"},
{file = "ruff-0.1.15-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86811954eec63e9ea162af0ffa9f8d09088bab51b7438e8b6488b9401863c25e"},
{file = "ruff-0.1.15-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fd4025ac5e87d9b80e1f300207eb2fd099ff8200fa2320d7dc066a3f4622dc6b"},
{file = "ruff-0.1.15-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b17b93c02cdb6aeb696effecea1095ac93f3884a49a554a9afa76bb125c114c1"},
{file = "ruff-0.1.15-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:ddb87643be40f034e97e97f5bc2ef7ce39de20e34608f3f829db727a93fb82c5"},
{file = "ruff-0.1.15-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:abf4822129ed3a5ce54383d5f0e964e7fef74a41e48eb1dfad404151efc130a2"},
{file = "ruff-0.1.15-py3-none-musllinux_1_2_i686.whl", hash = "sha256:6c629cf64bacfd136c07c78ac10a54578ec9d1bd2a9d395efbee0935868bf852"},
{file = "ruff-0.1.15-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:1bab866aafb53da39c2cadfb8e1c4550ac5340bb40300083eb8967ba25481447"},
{file = "ruff-0.1.15-py3-none-win32.whl", hash = "sha256:2417e1cb6e2068389b07e6fa74c306b2810fe3ee3476d5b8a96616633f40d14f"},
{file = "ruff-0.1.15-py3-none-win_amd64.whl", hash = "sha256:3837ac73d869efc4182d9036b1405ef4c73d9b1f88da2413875e34e0d6919587"},
{file = "ruff-0.1.15-py3-none-win_arm64.whl", hash = "sha256:9a933dfb1c14ec7a33cceb1e49ec4a16b51ce3c20fd42663198746efc0427360"},
{file = "ruff-0.1.15.tar.gz", hash = "sha256:f6dfa8c1b21c913c326919056c390966648b680966febcb796cc9d1aaab8564e"},
{ file = "ruff-0.2.1-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:dd81b911d28925e7e8b323e8d06951554655021df8dd4ac3045d7212ac4ba080" },
{ file = "ruff-0.2.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:dc586724a95b7d980aa17f671e173df00f0a2eef23f8babbeee663229a938fec" },
{ file = "ruff-0.2.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c92db7101ef5bfc18e96777ed7bc7c822d545fa5977e90a585accac43d22f18a" },
{ file = "ruff-0.2.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:13471684694d41ae0f1e8e3a7497e14cd57ccb7dd72ae08d56a159d6c9c3e30e" },
{ file = "ruff-0.2.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a11567e20ea39d1f51aebd778685582d4c56ccb082c1161ffc10f79bebe6df35" },
{ file = "ruff-0.2.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:00a818e2db63659570403e44383ab03c529c2b9678ba4ba6c105af7854008105" },
{ file = "ruff-0.2.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:be60592f9d218b52f03384d1325efa9d3b41e4c4d55ea022cd548547cc42cd2b" },
{ file = "ruff-0.2.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fbd2288890b88e8aab4499e55148805b58ec711053588cc2f0196a44f6e3d855" },
{ file = "ruff-0.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3ef052283da7dec1987bba8d8733051c2325654641dfe5877a4022108098683" },
{ file = "ruff-0.2.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:7022d66366d6fded4ba3889f73cd791c2d5621b2ccf34befc752cb0df70f5fad" },
{ file = "ruff-0.2.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:0a725823cb2a3f08ee743a534cb6935727d9e47409e4ad72c10a3faf042ad5ba" },
{ file = "ruff-0.2.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:0034d5b6323e6e8fe91b2a1e55b02d92d0b582d2953a2b37a67a2d7dedbb7acc" },
{ file = "ruff-0.2.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:e5cb5526d69bb9143c2e4d2a115d08ffca3d8e0fddc84925a7b54931c96f5c02" },
{ file = "ruff-0.2.1-py3-none-win32.whl", hash = "sha256:6b95ac9ce49b4fb390634d46d6ece32ace3acdd52814671ccaf20b7f60adb232" },
{ file = "ruff-0.2.1-py3-none-win_amd64.whl", hash = "sha256:e3affdcbc2afb6f5bd0eb3130139ceedc5e3f28d206fe49f63073cb9e65988e0" },
{ file = "ruff-0.2.1-py3-none-win_arm64.whl", hash = "sha256:efababa8e12330aa94a53e90a81eb6e2d55f348bc2e71adbf17d9cad23c03ee6" },
{ file = "ruff-0.2.1.tar.gz", hash = "sha256:3b42b5d8677cd0c72b99fcaf068ffc62abb5a19e71b4a3b9cfa50658a0af02f1" },
]
[[package]]
name = "setuptools"
version = "69.0.3"
version = "69.1.0"
description = "Easily download, build, install, upgrade, and uninstall Python packages"
optional = false
python-versions = ">=3.8"
files = [
{file = "setuptools-69.0.3-py3-none-any.whl", hash = "sha256:385eb4edd9c9d5c17540511303e39a147ce2fc04bc55289c322b9e5904fe2c05"},
{file = "setuptools-69.0.3.tar.gz", hash = "sha256:be1af57fc409f93647f2e8e4573a142ed38724b8cdd389706a867bb4efcf1e78"},
{ file = "setuptools-69.1.0-py3-none-any.whl", hash = "sha256:c054629b81b946d63a9c6e732bc8b2513a7c3ea645f11d0139a2191d735c60c6" },
{ file = "setuptools-69.1.0.tar.gz", hash = "sha256:850894c4195f09c4ed30dba56213bf7c3f21d86ed6bdaafb5df5972593bfc401" },
]
[package.extras]
docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"]
testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"]
testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.1)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"]
docs = [
"furo",
"jaraco.packaging (>=9.3)",
"jaraco.tidelift (>=1.4)",
"pygments-github-lexers (==0.0.5)",
"rst.linker (>=1.9)",
"sphinx (<7.2.5)",
"sphinx (>=3.5)",
"sphinx-favicon",
"sphinx-inline-tabs",
"sphinx-lint",
"sphinx-notfound-page (>=1,<2)",
"sphinx-reredirects",
"sphinxcontrib-towncrier",
]
testing = [
"build[virtualenv]",
"filelock (>=3.4.0)",
"flake8-2020",
"ini2toml[lite] (>=0.9)",
"jaraco.develop (>=7.21)",
"jaraco.envs (>=2.2)",
"jaraco.path (>=3.2.0)",
"pip (>=19.1)",
"pytest (>=6)",
"pytest-checkdocs (>=2.4)",
"pytest-cov",
"pytest-enabler (>=2.2)",
"pytest-home (>=0.5)",
"pytest-mypy (>=0.9.1)",
"pytest-perf",
"pytest-ruff (>=0.2.1)",
"pytest-timeout",
"pytest-xdist",
"tomli-w (>=1.0.0)",
"virtualenv (>=13.0.0)",
"wheel",
]
testing-integration = [
"build[virtualenv] (>=1.0.3)",
"filelock (>=3.4.0)",
"jaraco.envs (>=2.2)",
"jaraco.path (>=3.2.0)",
"packaging (>=23.1)",
"pytest",
"pytest-enabler",
"pytest-xdist",
"tomli",
"virtualenv (>=13.0.0)",
"wheel",
]
[[package]]
name = "six"
@ -822,13 +903,13 @@ files = [
[[package]]
name = "tqdm"
version = "4.66.1"
version = "4.66.2"
description = "Fast, Extensible Progress Meter"
optional = false
python-versions = ">=3.7"
files = [
{file = "tqdm-4.66.1-py3-none-any.whl", hash = "sha256:d302b3c5b53d47bce91fea46679d9c3c6508cf6332229aa1e7d8653723793386"},
{file = "tqdm-4.66.1.tar.gz", hash = "sha256:d88e651f9db8d8551a62556d3cff9e3034274ca5d66e93197cf2490e2dcb69c7"},
{ file = "tqdm-4.66.2-py3-none-any.whl", hash = "sha256:1ee4f8a893eb9bef51c6e35730cebf234d5d0b6bd112b0271e10ed7c24a02bd9" },
{ file = "tqdm-4.66.2.tar.gz", hash = "sha256:6cd52cdf0fef0e0f543299cfc96fec90d7b8a7e88745f411ec33eb44d5ed3531" },
]
[package.dependencies]
@ -882,4 +963,4 @@ test = ["pytest (>=6.0.0)", "setuptools (>=65)"]
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
content-hash = "d3c55a336e33098e99c0ddac5106366637559c21a5055cd39b98668c380da740"
content-hash = "ad7bc225fd2048867bce6d5b96c739554d4b7a16bd035a60e4d7d2d82ecd7811"

View File

@ -20,7 +20,10 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
]
packages = [{ include = "comicfn2dict" }, { include = "tests", format = "sdist" }]
packages = [
{ include = "comicfn2dict" },
{ include = "tests", format = "sdist" },
]
exclude = ["*/**/*~"]
include = []
@ -42,7 +45,7 @@ pytest-gitignore = "^1.3"
codespell = "^2.1.0"
pyright = "^1.1.232"
radon = { version = "^6.0.1", extras = ["toml"] }
ruff = "^0.1.2"
ruff = "^0.2.1"
types-python-dateutil = "^2.8.19"
vulture = "^2.3"
@ -77,7 +80,7 @@ omit = [
"dist/*",
"node_modules/*",
"test-results/*",
"typings/*"
"typings/*",
]
[tool.pyright]
@ -102,8 +105,6 @@ pythonVersion = "3.10"
pythonPlatform = "All"
[tool.pytest.ini_options]
junit_family = "xunit2"
# --black
addopts = """
--junit-xml=test-results/pytest/results.xml
-ra
@ -113,21 +114,38 @@ addopts = """
--cov-append
--cov-report=html
--cov-report=term
--ignore=.git
--ignore=cache
--ignore=frontend
--ignore=typings
"""
junit_family = "xunit2"
testpaths = "tests"
[tool.radon]
exclude = "*~,.git/*,.mypy_cache/*,.pytest_cache/*,.venv*,__pycache__/*,cache/*,dist/*,node_modules/*,test-results/*,typings/*"
[tool.ruff]
extend-exclude = ["typings"]
extend-ignore = ["S101", "D203", "D213",
target-version = "py310"
[tool.lint.ruff]
extend-ignore = [
"S101",
"D203",
"D213",
# Format ignores
"W191", "E501", "E111", "E114", "E117", "D206", "D300", "Q000", "Q001",
"Q002", "Q003", "COM812", "COM819", "ISC001", "ISC002"
"W191",
"E501",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
"ISC001",
"ISC002",
]
extend-select = [
"A",
@ -168,19 +186,16 @@ extend-select = [
"TRY",
"UP",
"W",
"YTT"
"YTT",
# "ANN", "ERA", "COM"
]
external = ["V101"]
# format = "grouped"
# show-source = true
target-version = "py310"
task-tags = ["TODO", "FIXME", "XXX", "http", "HACK"]
[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["SLF001", "T201", "T203"]
[tool.ruff.pycodestyle]
[tool.ruff.lint.pycodestyle]
ignore-overlong-task-comments = true
[tool.vulture]