I was trying to type the following line:
self._label = QtGui.QLabel("Select parameter from selected category")
And PyCharm decided I was doing an SQL Query or something and gave errors about having no data connections configured. The Syntax Highlighting within the string changed and Select
and from
became highlighted like keywords. Since I don't use SQL or any database whatnot at all (I'm an engineer who programs - I don't use databases, sorry) ... I simply disabled the SQL Plugin in the PyCharm plugin settings.
Is there a less drastic way to disable this auto-inspection behavior in case I ever wanted that plugin turned on? It seems drastic that any time it sees Select x from y
in a string it thinks it's an SQL query. I tried disabling all the SQL inspections under the Inspections settings.
Thanks for any help.
I am using PhpStorm and I have managed to stop it complaining by right-clicking the error square in the top right then ...
Right click Square > Customize highlighting level > Configure Inspections >
Scroll down to Sql and expand the tree
Uncheck "No Data Sources congirued"
Although you may consider this drastic its the only way, JetBains IDEs are professional tools which have been in development a while, because of the many different requirements of its users it has many options and features.
The settings menu is very clever, you can click
File > Settings > {Then start typing in search : SQL }
Then you can already see the SQL Inspection options including the ones that you want to disable.
When you get used to your IDE of choice, you will be fine
You can change it in Preferences> Editor> Inspection (⌘-comma for Mac user) Here is the snapshot
To turn off SQL injections go to
Settings | Editor | Language injections
and turn off anything related to SQL.The message:
is a little explicit and IMHO a little unnecessary, because I really think that I don't need to configure a database for every project which we have some SQL queries.
To handle with this message, you have two options:
or
Disable this SQL dialect detection inspection on the Inspection options on the IDE settings:
The second option is the best approach for me, unless we really want or need a Data Source on your project.