Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Python SyntaxWarnings in iapp_parser.py #1612

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

intgr
Copy link

@intgr intgr commented Mar 14, 2023

If I run Python's compileall on code of the f5-sdk Python package, I get the following SyntaxWarnings:

% python3 -m compileall iapp_parser.py
Compiling 'iapp_parser.py'...
iapp_parser.py:123: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if brace_count is 0:
iapp_parser.py:126: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if brace_count is not 0:

This PR fixes these warnings.

Using Python 3.11.2, but I believe these warnings were already introduced in Python 3.8.

Background: https://adamj.eu/tech/2020/01/21/why-does-python-3-8-syntaxwarning-for-is-literal/

If I run Python's `compileall` code of the `f5-sdk` Python package, I get the following SyntaxWarnings:

```
% python3 -m compileall iapp_parser.py
Compiling 'iapp_parser.py'...
iapp_parser.py:123: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if brace_count is 0:
iapp_parser.py:126: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if brace_count is not 0:
```

This PR fixes these warnings.

Using Python 3.11.2, but I believe these warnings were already introduced in Python 3.8.

Background: https://adamj.eu/tech/2020/01/21/why-does-python-3-8-syntaxwarning-for-is-literal/
@intgr
Copy link
Author

intgr commented Mar 29, 2023

Solves part of #1554.

@zhaoqin-github Ping?

@zhaoqin-github
Copy link
Collaborator

Solves part of #1554.

@zhaoqin-github Ping?

Hi Marti,

As described in the README at main page, this python module is "NO LONGER UNDER ACTIVE DEVELOPMENT". I am not the maintainer of this project, and will not publish a new version for public usage. If you need this change, maybe you can manage it in your downstream repo and create package by yourself. Very sorry for that!

@intgr
Copy link
Author

intgr commented Mar 30, 2023

Hi. Fair enough. I interpreted "not under active development" as in "we are no longer adding new features".

If you mean that this project is unmaintained -- bugs won't be fixed etc -- then I think the message could be clearer. Say it in the heading that this is unmaintained, and "issues and pull requests will not be handled".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants