diff options
author | George Thomas <thegeorgeous@users.noreply.github.com> | 2020-01-15 10:26:07 +0530 |
---|---|---|
committer | Irina Truong <i.chernyavska@gmail.com> | 2020-01-14 20:56:07 -0800 |
commit | 77a361966a6cbe73ba153710f10f32cc27d167f5 (patch) | |
tree | 97e67bf9cf5c6813e2eb0e515a2e84472fd778f6 | |
parent | 2b55da84812f94bc98d3586244f02749326062d5 (diff) |
Fix warning raised for using `is not` to compare string literal (#1139)
Using `is not` for comparing string literals raises warning that != should be
used.
Fixes #1138
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | changelog.rst | 7 | ||||
-rw-r--r-- | pgcli/main.py | 2 |
3 files changed, 8 insertions, 2 deletions
@@ -103,6 +103,7 @@ Contributors: * Martin Matejek (mmtj) * Jonas Jelten * BrownShibaDog + * George Thomas(thegeorgeous) Creator: -------- diff --git a/changelog.rst b/changelog.rst index 1b12b15f..991139be 100644 --- a/changelog.rst +++ b/changelog.rst @@ -7,11 +7,15 @@ Features: * Add `__main__.py` file to execute pgcli as a package directly (#1123). * Add support for ANSI escape sequences for coloring the prompt (#1122). +Bug fixes: + +* Fix warning raised for using `is not` to compare string literal + Internal: --------- * Fix dead link in development guide. (Thanks: `BrownShibaDog`_) - + 2.2.0: ====== @@ -1023,3 +1027,4 @@ Improvements: .. _`Sebastian Janko`: https://github.com/sebojanko .. _`Pedro Ferrari`: https://github.com/petobens .. _`BrownShibaDog`: https://github.com/BrownShibaDog +.. _`thegeorgeous`: https://github.com/thegeorgeous diff --git a/pgcli/main.py b/pgcli/main.py index 2301d16f..54d4941f 100644 --- a/pgcli/main.py +++ b/pgcli/main.py @@ -1258,7 +1258,7 @@ def cli( if list_databases: database = "postgres" - if dsn is not "": + if dsn != "": try: cfg = load_config(pgclirc, config_full_path) dsn_config = cfg["alias_dsn"][dsn] |