[PR #2420] chore: apply ruff's pyflakes linter rules #23632

Closed
opened 2026-02-21 20:21:28 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/2420

State: closed
Merged: Yes


error = ('Invalid {arg}: {val}. {arg} must be conform to the format {format}'
              .format(arg=self.argument, val=value, format=self.format))
  • flattern unnecessary string formatting into static stirngs
  • ignoring the following rules
    • to allow star imports
      • F403: undefined-local-with-import-star
      • F405: undefined-local-with-import-star-usage
    • to allow undefined name, F821, for the class method returning types of the class itself, e.g.
      class PromptType:
       @classmethod
          def value_of(cls, value: str) -> 'PromptType':
      
    • to allow unused variable, F841
**Original Pull Request:** https://github.com/langgenius/dify/pull/2420 **State:** closed **Merged:** Yes --- - `pyflake` rules in ruff: https://docs.astral.sh/ruff/rules/#pyflakes-f - fix 1 missing placeholder `format` for format string in `libs/helper` ``` error = ('Invalid {arg}: {val}. {arg} must be conform to the format {format}' .format(arg=self.argument, val=value, format=self.format)) ``` - flattern unnecessary string formatting into static stirngs - ignoring the following rules - to allow star imports - F403: undefined-local-with-import-star - F405: undefined-local-with-import-star-usage - to allow undefined name, F821, for the class method returning types of the class itself, e.g. ``` class PromptType: @classmethod def value_of(cls, value: str) -> 'PromptType': ``` - to allow unused variable, F841
yindo added the pull-request label 2026-02-21 20:21:28 -05:00
yindo closed this issue 2026-02-21 20:21:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#23632