Commit graph

32 commits

Author SHA1 Message Date
Markus Heiser 542f7d0d7b [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION
In the past, some files were tested with the standard profile, others with a
profile in which most of the messages were switched off ... some files were not
checked at all.

- ``PYLINT_SEARXNG_DISABLE_OPTION`` has been abolished
- the distinction ``# lint: pylint`` is no longer necessary
- the pylint tasks have been reduced from three to two

  1. ./searx/engines -> lint engines with additional builtins
  2. ./searx ./searxng_extra ./tests -> lint all other python files

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-11 14:55:38 +01:00
ToxyFlog1627 f175574f37 [fix] typos in documentation & messages 2023-08-13 08:50:29 +02:00
Markus Heiser a60851bd59 [fix] version format string generated by 'git show'
Newer versions of git [1] do no longer support a format string that includes a minus
to remove leading zeros [2].  The format string '%Y.%m.%d'  is more version rod.

[1] https://github.com/searxng/searxng/issues/2413#issuecomment-1542320387
[2] https://github.com/searxng/searxng/pull/2122/files

Closes: https://github.com/searxng/searxng/issues/2413
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-05-10 18:33:45 +02:00
Alexandre Flament 06b5068a2e SearXNG version: YYYY.MM.DD without leading zero 2023-01-22 10:45:00 +00:00
Alexandre Flament f759a84af4 SearXNG version: fix make docker
continuation of #2117
related to #2111

This commit:
* fixes the Docker tag using an additional variable DOCKER_TAG, see searx/version.py
* fixes the Docker labels org.label-schema.vcs-ref and org.opencontainers.image.revision
* adds searx/version_frozen to .gitignore
2023-01-20 10:46:00 +00:00
Alexandre Flament 0515f2974b Version number follows PEP440 : replace - by +
Close #2111
2023-01-20 09:05:44 +00:00
Alexandre Flament 2babf59adc [fix] pyright repported errors
The errors make pyright usage useless since a new error won't be seen [1].

[1] https://github.com/searxng/searxng/pull/1569

```
  searx/compat.py:11:27 - error: Expression of type "Type[cached_property[_T@cached_property]]" cannot be assigned to declared type "Type[cached_property]"
    "Type[cached_property[_T@cached_property]]" is incompatible with "Type[cached_property]"
    Type "Type[cached_property[_T@cached_property]]" cannot be assigned to type "Type[cached_property]" (reportGeneralTypeIssues)
  searx/utils.py:69:36 - error: Expression of type "None" cannot be assigned to parameter of type "str"
    Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
  searx/utils.py:573:85 - error: Expression of type "None" cannot be assigned to parameter of type "int"
    Type "None" cannot be assigned to type "int" (reportGeneralTypeIssues)
  searx/webapp.py:1306:22 - error: Argument of type "str" cannot be assigned to parameter "__a" of type "BytesPath" in function "join"
    Type "str" cannot be assigned to type "BytesPath"
      "str" is incompatible with "bytes"
      "str" is incompatible with protocol "PathLike[bytes]"
        "__fspath__" is not present (reportGeneralTypeIssues)
  searx/webapp.py:1306:68 - error: Argument of type "Literal['themes']" cannot be assigned to parameter "paths" of type "BytesPath" in function "join"
    Type "Literal['themes']" cannot be assigned to type "BytesPath"
      "Literal['themes']" is incompatible with "bytes"
      "Literal['themes']" is incompatible with protocol "PathLike[bytes]"
        "__fspath__" is not present (reportGeneralTypeIssues)
  searx/webapp.py:1306:78 - error: Argument of type "str | Any | None" cannot be assigned to parameter "paths" of type "BytesPath" in function "join"
    Type "str | Any | None" cannot be assigned to type "BytesPath"
      Type "str" cannot be assigned to type "BytesPath"
        "str" is incompatible with "bytes"
        "str" is incompatible with protocol "PathLike[bytes]"
          "__fspath__" is not present (reportGeneralTypeIssues)
  searx/webapp.py:1306:85 - error: Argument of type "Literal['img']" cannot be assigned to parameter "paths" of type "BytesPath" in function "join"
    Type "Literal['img']" cannot be assigned to type "BytesPath"
      "Literal['img']" is incompatible with "bytes"
      "Literal['img']" is incompatible with protocol "PathLike[bytes]"
        "__fspath__" is not present (reportGeneralTypeIssues)
  searx/engines/mongodb.py:8:6 - warning: Import "pymongo" could not be resolved (reportMissingImports)
  searx/engines/mysql_server.py:9:8 - warning: Import "mysql.connector" could not be resolved (reportMissingImports)
  searx/engines/postgresql.py:9:8 - warning: Import "psycopg2" could not be resolved from source (reportMissingModuleSource)
  searx/engines/xpath.py:187:28 - warning: "categories" is not defined (reportUndefinedVariable)
  searx/search/__init__.py:184:82 - warning: "flask" is not defined (reportUndefinedVariable)
  searx/search/checker/background.py:19:26 - error: Type of "schedule" is partially unknown
    Type of "schedule" is "(delay: Any, func: Any, *args: Any) -> Literal[True]" (reportUnknownVariableType)
  searx/shared/__init__.py:8:12 - warning: Import "uwsgi" could not be resolved (reportMissingImports)
  searx/shared/shared_uwsgi.py:5:8 - warning: Import "uwsgi" could not be resolved (reportMissingImports)
```
2022-07-30 18:04:44 +02:00
Markus Heiser 0c489a25ac [fix] version.py: git format '%cs' is not downward compatible
Committer date, short format YYYY-MM-DD ('%cs') [1] is not supported by older git
versions.  Instead use '%cd' committer date (format respects --date= option) [2].

[1] https://www.git-scm.com/docs/git-show#Documentation/git-show.txt-emcsem
[2] https://www.git-scm.com/docs/git-show#Documentation/git-show.txt-emcdem

Suggested-by: @ravermeister https://github.com/searxng/searxng/issues/1251#issuecomment-1146282429
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-06-04 09:15:26 +02:00
Léon Tiekötter de5062c10a
[mod] version formatting
Change SearXNG version formatting to YYYY.MM.DD-commit_hash
2022-02-21 21:18:37 +01:00
Markus Heiser 3d96a9839a [format.python] initial formatting of the python code
This patch was generated by black [1]::

    make format.python

[1] https://github.com/psf/black

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27 09:26:22 +01:00
Markus Heiser 2a3b9a2e26 [pylint] searx: drop no longer needed 'missing-function-docstring'
Suggested-by: @dalf https://github.com/searxng/searxng/issues/102#issuecomment-914168470
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-09-07 13:34:35 +02:00
Markus Heiser e856b563dd [pylint] Pylint 2.10 - unspecified-encoding
Pylint 2.10 added new default checks [1]:

unspecified-encoding:
  Emitted when open() is called without specifying an encoding [2]

[1] https://pylint.pycqa.org/en/latest/whatsnew/2.10.html
[2] https://github.com/PyCQA/pylint/issues/3826

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-08-31 10:49:36 +02:00
Alexandre Flament 4b43775c91 version based on the git repository
This commit remove the need to update the brand for GIT_URL and GIT_BRANCH:
there are read from the git repository.

It is possible to call python -m searx.version freeze to freeze the current version.
Useful when the code is installed outside git (distro package, docker, etc...)
2021-07-30 14:40:09 +02:00
Adam Tauber ae122ea943 [enh] release v1.0.0 2021-03-27 20:30:08 +01:00
Alexandre Flament 39ac81478c prepare release 0.18.0 2020-12-14 19:03:09 +01:00
Adam Tauber 8199ab50f9 [enh] release v0.17.0 2020-07-09 17:31:28 +02:00
Adam Tauber 6060ab85f8 [enh] version v0.16.0 2020-01-30 13:39:06 +01:00
Noémi Ványi 29d146dde6 update changelog and version.py 2019-01-06 21:59:59 +01:00
Adam Tauber 3ac578c0a8 [enh] version 0.14.0 2018-02-19 00:22:56 +01:00
Adam Tauber 7828a1833b [enh] version 0.13.1 2017-11-23 17:59:06 +01:00
Adam Tauber e766939440 [enh] version 0.13.0 2017-11-21 19:29:35 +01:00
Adam Tauber f82646f386 [enh] version 0.12.0 2017-06-04 13:19:15 +02:00
Adam Tauber d6cbc6b78b [enh] 0.11.0 version bump 2017-01-10 21:09:04 +01:00
Adam Tauber ce371f766a [enh] version 0.10.0
closes #659
2016-09-06 18:31:25 +02:00
Adam Tauber 2caf0d4c9a [enh] version 0.9.0 - #529 2016-05-24 13:35:52 +02:00
Adam Tauber 371fc09b6f [enh] version 0.8.1 2015-12-22 23:21:12 +01:00
Adam Tauber 23dab175b2 [enh] v0.8.0 2015-09-08 22:13:09 +02:00
Adam Tauber 40ae8c8247 [enh] v0.7.0 2015-02-03 19:15:58 +01:00
Adam Tauber fcc394540b [enh] v0.6.0 2014-12-25 17:56:01 +01:00
Adam Tauber 2538a3ec26 [enh] v0.5.0 2014-12-08 23:57:36 +01:00
Adam Tauber b1b0b82a2a [fix] version.py pep8 and py3 compatibility 2014-12-02 00:09:08 +01:00
Thomas Pointhuber aba65369d2 [enh] make version of searx readable 2014-11-18 11:37:42 +01:00