summaryrefslogtreecommitdiffstatshomepage
path: root/src (follow)
Commit message (Collapse)AuthorAgeLines
* backend/plugins: Do not explicitly require source in anchira.to scraperWolfgang Müller2025-01-16-2/+8
| | | | | We've come across info.yaml files without this field. If it is missing, instead rely on a simple heuristic.
* backend/lint: Do not shadow certain builtinsWolfgang Müller2024-11-15-39/+39
| | | | | | | | | | | | This commit enables ruff's flake8-builtin linter that emits warnings when builtin functions are shadowed. This is useful for builtins like "dict", "list", or "str" which we use often. Given the nature of this program we historically rely a lot on the usage of "id", "hash", and "filter" as variable names which also shadow Python builtins. For now let's ignore those, we have not used any of them in our code and the impact to the codebase would be considerable. This might be revisited in the future.
* backend/api: Remove superfluous scalar definitionWolfgang Müller2024-11-15-5/+0
| | | | | Sadly we couldn't find out what this was meant to do, but we believe it was added in error. All tests pass with this removed, so we can drop it.
* backend/plugins: Have E-Hentai raise an error from status_code earlyWolfgang Müller2024-11-15-19/+19
| | | | This makes the code clearer and saves a whole indentation level.
* backend/plugins: Catch E-Hentai errors only for relevant linesWolfgang Müller2024-11-15-11/+11
|
* backend/plugins: Throw error if E-Hentai response is missing 'gmetadata'Wolfgang Müller2024-11-15-0/+2
| | | | | | | It might be that we get a valid (maybe empty) response from the API, in which case we do not want to simply crash because we expect the 'gmetadata' field in the response. Instead, throw a proper ScrapeError for it.
* backend/plugins: Remove stray apostropheWolfgang Müller2024-11-15-1/+1
|
* backend/plugins: Have exhentai assume no censorship for non-hWolfgang Müller2024-11-15-0/+3
| | | | | | Non-H usually has nothing to censor, so this should be a safe default. We have not come across anything where this would have been a false positive.
* backend/plugins: Use language parser from scraper utilsWolfgang Müller2024-11-14-32/+5
| | | | | | Now that we have this in our utility suite, we can make use of it in the built-in scraper plugins. This increases coverage and removes a lot of duplicate code.
* backend/scraper: Have collect() ignore None resultsWolfgang Müller2024-11-14-3/+6
| | | | | | If a parser function returned None we yield it regardless, even though it won't have any impact further down the line. Instead clean up the collect() stream as early as possible.
* backend/tests: Add test for open_archive_fileWolfgang Müller2024-11-14-1/+1
|
* backend/plugins: Use "no cover" pragma for consistencyWolfgang Müller2024-11-14-1/+1
|
* backend/plugins: Fix MangaDex scraper title formattingWolfgang Müller2024-11-14-1/+1
|
* backend/scraper: Add parser methods for LanguageWolfgang Müller2024-11-14-0/+32
| | | | | | We can expect a number of scraper sources to either give languages as ISO 639-3 or as their English name, so it makes sense to implement a simple parser method on our side.
* backend/lint: Ignore B027 in api/inputs.pyWolfgang Müller2024-11-14-1/+1
| | | | | | | Even though our base class here is abstract, this method is not, so we can ignore B027 [1]. [1] https://docs.astral.sh/ruff/rules/empty-method-without-abstract-decorator/
* backend/lint: Properly chain exceptionsWolfgang Müller2024-11-14-6/+6
| | | | | | This fixes flake8-bugbear's B904 [1]. [1] https://docs.astral.sh/ruff/rules/raise-without-from-inside-except/
* backend/plugins: Have anchira scraper use parse_dict from scraper utilsWolfgang Müller2024-11-14-11/+2
| | | | | | This cuts down on code duplication and also fixes B023 [1]. [1] https://docs.astral.sh/ruff/rules/function-uses-loop-variable/#function-uses-loop-variable-b023
* backend/lint: Stop using mutable objects as function argument defaultsWolfgang Müller2024-11-14-3/+12
| | | | See https://docs.astral.sh/ruff/rules/mutable-argument-default/
* backend/lint: Implement pyupgrade suggestionsWolfgang Müller2024-11-14-1/+1
|
* backend/lint: Implement flake8-simplify suggestionsWolfgang Müller2024-11-14-19/+17
|
* backend/scraper: Bind loop variables correctlyWolfgang Müller2024-11-14-2/+2
| | | | | This was uncovered by bugbear, but did not seem to have tripped our test. Fix it anyway.
* backend/lint: Fix import formattingWolfgang Müller2024-11-14-1/+2
|
* backend: Report Archive size as floatWolfgang Müller2024-03-25-1/+1
| | | | | | | | | GraphQL integers are 32-bit as per spec [1] [2]. Implementations may therefore error on large numbers. Since an archive's size can reasonably exceed this value, make sure to report it as a float instead. [1] https://graphql.org/learn/schema/ [2] https://github.com/graphql/graphql-js/issues/292#issuecomment-186702763
* Initial commit0.1.0Wolfgang Müller2024-03-05-0/+4821