PEP 498 required f-strings to be recognizable by existing tooling, such as syntax highlighters,
by prohibiting re-using quotes of the same kind and having line breaks inside expression fragments.
We used to detect these problems already at the lexer level, correctly replacing violating quotes
with FSTRING_END token, and appending STATEMENT_BREAK tokens to illegal line breaks inside expressions,
depending on the lexer's state. Now, thanks to a general f-string grammar in PEP 701, most of this
bookkeeping could be moved from the lexer to the CompatibilityVisitor (to still be reported
for previous versions of the language and by the compatibility inspection).
Previously forbidden backslashes and line comments are now also detected by the CompatibilityVisitor
instead of the version-agnostic FStringAnnotator.
One side effect of the new grammar is that parser recovery in pre-3.12 version of Python became
slightly worse. For instance, something like `f'{foo'` used to be recognized as an f-string
with an incomplete fragment lacking its closing brace. Now, it's parsed as an incomplete
f-string, lacking its own closing quote, containing an incomplete string literal inside
an incomplete fragment. What's more, parsing of this fragment's expression doesn't terminate
until the end of a file, because STATEMENT_BREAK is never produced by PythonIndentingProcessor
while it's inside an f-string fragment, and every quote is considered a new string literal.
Examples of parsing tests affected by this are:
PythonParsingTest.testFStringFragmentIncompleteTypeConversionBeforeClosingQuote
PythonParsingTest.testFStringIncompleteFragmentWithTypeConversion
PythonParsingTest.testFStringIncompleteFragment
I also had to simplify some scenarios from PythonHighlightingTest, removing snippets
with incomplete fragments or moving such examples to the very end of a file.
It's not clear how to handle these situations not overcomplicating the lexer.
(cherry picked from commit 03ba6d7fba1b45a84aa92221e6a452645a765205)
IJ-MR-115763
GitOrigin-RevId: cd36470d9cae353fe3caeb2d3b628d8743b46cbb
Calculated column statistics for visualization in pandas and polars, implemented parsing in DSPyDevdTableDataProviderWithDescribe.kt, introduced getValueOccurrencesCount to store statistics for visualization.
Enabled histogram drawing for numeric and boolean columns in compact and detailed statistic panel modes in DSStatisticsTableHeader.kt, and relocated DSStatisticsHeader utility classes to DSStatisticTableHeaderUtils.kt.
Merge-request: IJ-MR-115129
Merged-by: Georgii Zorabov <georgii.zorabov@jetbrains.com>
GitOrigin-RevId: 413a950187d9fb17e1ac936198bee8d85c47347b
Found that `com.intellij.AbstractBundle.getMessage` applies the formatting to the parameters passed as a `Number`. For example, it translates 1032 int to "1,032" string. And then `toInt` method fails to parse it.
Better to use String value as ID for callbacks to avoid this problem.
GitOrigin-RevId: 95a667a35f6107ec71df0da26892541d1d964b98
It's confusing to have a directory named *Src which is marked as a resource root. Also, we need to add a real source root to intellij.pycharm.community module to store an implementation of ExternalProductResourceUrls in it (IJPL-204).
GitOrigin-RevId: cf140b320d40b9357177035b98bc0fc0fe6c5854
Removed the "commons-collections" library across multiple modules as it is no longer needed. This clean up helps streamline dependencies and reduce project complexity.
GitOrigin-RevId: 3763cf649644d8782e03b7419d780e245c5f3eef
3.12.0rc2 is already available for `pyenv`
so there is no need to limit 3.12 tests with Windows
GitOrigin-RevId: 68cca5bb2ff93a4015111bf9263433ffd33239f4
If not wrapped, if you start a run configuration from client, Run tool window will be opened only on Host.
GitOrigin-RevId: 4bf3b77e1f79a554eb26446d155c7aa316d53c4b
[DS-2562] removed polars tests
[DS-2562] split polars and pandas into different files and made tables fixtures
[DS-2562] added checks that generated commands actually work in Python
[DS-2562] changed function name
[DS-2562] moved tests into proper directory
[DS-2562] specified return type in createAscSortKeys
[DS-2562] removed duplications
[DS-2562] renamed tests and test file, added blank lines
[DS-2562] fixed naming in tests
[DS-2562] fixed caption to getSortCommand method
[DS-2562] deleted unused imports
[DS-2562] fixed tests
[DS-2562] fixed test for checking that command is generated properly
[DS-2562] refactored code and added test for checking that command is generated properly
[DS-2562] fixed comments
[DS-2562] added proper disposing
[DS-2562] fixed formatting
[DS-2562] fixed naming
[DS-2562] removed redundant dependencies
[DS-2562] removed unintentional formatting changed
[DS-2562] deleted changes in canSortTogether, fixed SortingTest
[DS-2562] created test and changed canSortTogether, so it is not taking a grid as a parameter
Merge-request: IJ-MR-113863
Merged-by: Georgii Zorabov <georgii.zorabov@jetbrains.com>
GitOrigin-RevId: 297e5b2f880fe8ac577b8704d24365256305ff1d