{"id":16393565,"url":"https://github.com/code-yeongyu/jola","last_synced_at":"2026-06-17T03:31:40.440Z","repository":{"id":210288274,"uuid":"726176372","full_name":"code-yeongyu/jola","owner":"code-yeongyu","description":"JOLA: Judicious Observant Linting Assistant 🚀","archived":false,"fork":false,"pushed_at":"2023-12-04T06:54:48.000Z","size":607,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-31T14:52:22.642Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code-yeongyu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-01T17:41:24.000Z","updated_at":"2023-12-04T06:51:06.000Z","dependencies_parsed_at":"2023-12-01T20:29:04.208Z","dependency_job_id":"be91fe35-d581-4229-acf6-b4bf09c5c042","html_url":"https://github.com/code-yeongyu/jola","commit_stats":null,"previous_names":["code-yeongyu/jola"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/code-yeongyu/jola","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fjola","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fjola/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fjola/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fjola/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-yeongyu","download_url":"https://codeload.github.com/code-yeongyu/jola/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fjola/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34433085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T04:53:38.259Z","updated_at":"2026-06-17T03:31:40.424Z","avatar_url":"https://github.com/code-yeongyu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/code-yeongyu/jola/master/docs/images/logo.png\" alt=\"JOLA\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cem\u003eJudicious Observant Linting Assistant 🚀\u003c/em\u003e\n\u003c/p\u003e\n\n# JOLA - Judicious Observant Linting Assistant 🚀\n\n## Introduction\n\nWelcome to JOLA, a groundbreaking Python linter!\n\nJOLA stands out in the Python development landscape as it focuses on an often-overlooked yet crucial aspect: **Django relationship fields type hinting**.\n\n### Why JOLA?\n\nJOLA currently fills a critical gap in Django development. The typical Language Server Protocols (LSPs) struggle, especially with relationship fields like `ForeignKey` and `OneToOneField`. JOLA not only detects missing type hints in these areas but also offers a `--fix` option to automatically rectify them.\n\nBut that's just the beginning! 🌟 JOLA is set to evolve with more incredible features. Future updates will include capabilities like auto-generating explicit imports, further simplifying and streamlining your Django development process. Stay tuned for these exciting enhancements!\n\n## Features\n\n### 🕵️‍♂️ Detect Missing Type Hints of Relationship Fields\n\nConsider the following Django model:\n\n```python\nclass Article(models.Model):\n    user = models.ForeignKey(User, ...)\n```\n\nIn this case, LSPs often can't comprehend what `article.user.email` means. JOLA detects such instances and helps in maintaining robust type hinting.\n\n#### 🛠️ Automatic Fix with `--fix`\n\nJOLA doesn't just point out issues; it fixes them! With the `--fix` option, JOLA can automatically add appropriate type hints, turning your code into:\n\n```python\nclass Article(models.Model):\n    user: models.ForeignKey[User] = models.ForeignKey(User, ...)\n```\n\nNow, your IDE understands exactly what `article.user.email` refers to!\n\n#### 🔗 Leverage Deep Relationships\n\nJOLA shines in complex scenarios involving nested relationships. For example:\n\n```python\nclass Profile(models.Model):\n    image_url = models.ImageField(...)\n\nclass User(models.Model):\n    profile: models.OneToOneField[Profile] = models.OneToOneField(Profile, ...)\n\nclass Article(models.Model):\n    user: models.ForeignKey[User] = models.ForeignKey(User, ...)\n```\n\nHere, JOLA ensures that even deeply nested attributes like `article.user.profile.image_url` are clearly understood by your language server.\n\n#### Limitations and Workarounds\n\nWhile JOLA is powerful, it has its limitations. For instance, when a `ForeignKey` is not directly defined with the actual model, JOLA cannot automatically fix it:\n\n```python\nclass Article(models.Model):\n    user = models.ForeignKey('users.User', ...)\n```\n\nIn such cases, I recommend you a workaround to avoid circular imports and maintain clarity, by manually:\n\n```python\nfrom typing import TYPE_CHECKING, Any\n\nif TYPE_CHECKING:\n    from users.models import User\nelse:\n    User = Any\n\nclass Article(models.Model):\n    user: models.ForeignKey[User] = models.ForeignKey('users.User', ...)\n```\n\nThis approach ensures type hinting for language servers without runtime import issues.\n\n## Installation\n\nCurrently, JOLA is available only for Python 3.9+.\n\nSadly, JOLA is not yet available on PyPI. I am working on it and this section will be updated once it is available.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-yeongyu%2Fjola","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-yeongyu%2Fjola","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-yeongyu%2Fjola/lists"}