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

chore: use ne for comparison against non literal #1152

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

Commits on Feb 2, 2022

  1. chore: use ne for comparison against non literal

    Use `!=` for comparison against non-literal, since Python >= 3.8 emits a
    warning about it.
    
    ```
    .../.venv/lib/python3.9/site-packages/jnpr/junos/device.py:909: SyntaxWarning: "is not" with a literal. Did you mean "!="?
      if rpc_rsp_e.text is not None and rpc_rsp_e.text.strip() is not "":
    .../.venv/lib/python3.9/site-packages/jnpr/junos/device.py:1330: SyntaxWarning: "is not" with a literal. Did you mean "!="?
      if auto_probe is not 0:
    .../.venv/lib/python3.9/site-packages/jnpr/junos/rpcmeta.py:157: SyntaxWarning: "is not" with a literal. Did you mean "!="?
      if model and filter_xml is None and options.get("format") is not "json":
    .../.venv/lib/python3.9/site-packages/jnpr/junos/utils/start_shell.py:147: SyntaxWarning: "is not" with a literal. Did you mean "!="?
      self.last_ok = got is not ""
    ```
    
    Signed-off-by: Ryo Tagami <rtagami@airstrip.jp>
    ryo-tagami committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    8dad724 View commit details
    Browse the repository at this point in the history