taplo icon indicating copy to clipboard operation
taplo copied to clipboard

False positive error when using poetry's git dependency

Open evgenii-hb opened this issue 2 years ago • 2 comments

Im trying to use github repo as a dependecy for my python project, the pyproject.toml looks like this

[tool.poetry]
name = "awesome_name"
version = "0.1.0"
description = "Cool project"

[tool.poetry.dependencies]
httplib = { git = "https://github.com/honestbank/data-science-feature-engineering-library.git", branch = "main" }
sshlib = { git = "[email protected]:honestbank/data-science-research-framework-library.git", branch = "main" }

Judjing by definitions here https://json.schemastore.org/pyproject.json , seems like there is a check whether field git is a valid url. Copy from the link:

"poetry-git-dependency": {
      "type": "object",
      "required": ["git"],
      "additionalProperties": false,
      "properties": {
        "git": {
          "type": "string",
          "description": "The url of the git repository.",
          "format": "uri"
        },
        "branch": {
          "type": "string",
          "description": "The branch to checkout."
        },

So in my case httplib have correct url but sshlib do not. Hence taplo throws a false error.

evgenii-hb avatar Aug 17 '23 08:08 evgenii-hb

In my understanding this is issue of schema definition and should be updated here https://github.com/SchemaStore/schemastore

Is that true?

evgenii-hb avatar Aug 17 '23 08:08 evgenii-hb

Yes this is true.

ia0 avatar Aug 17 '23 08:08 ia0

Closing since it's a schema issue

panekj avatar Aug 19 '24 19:08 panekj