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

Option for docstring to use single quoutes #22042

Open
10 tasks done
PanderMusubi opened this issue Apr 30, 2024 · 0 comments
Open
10 tasks done

Option for docstring to use single quoutes #22042

PanderMusubi opened this issue Apr 30, 2024 · 0 comments

Comments

@PanderMusubi
Copy link
Contributor

PanderMusubi commented Apr 30, 2024

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

Docstring created with Ctrl+Alt+D starts and ends with three double quotes """. Some developers prefer or some style guides demand the use of three single quotes '''. However, there is no option for this.

Please, add checkbox to Preferences / Editor / Advanced settings / Docstring type with the label Use single quotes instead of double quotes that by default is not checked.

What steps reproduce the problem?

  1. Open a Python file with a function, method or class declaration.
  2. Navigate to the first line of it.
  3. Press Cltr+Alt+D

What is the expected output? What do you see instead?

Expected:

    def credentials(filename: str) -> dict:
        '''
        
        :param filename: DESCRIPTION
        :type filename: str
        :return: DESCRIPTION
        :rtype: dict

        '''

instead:

    def credentials(filename: str, parent: bool = False) -> dict:
        """
        
        :param filename: DESCRIPTION
        :type filename: str
        :return: DESCRIPTION
        :rtype: dict

        """

Paste Traceback/Error Below (if applicable)

n/a

Versions

  • Spyder version: 5.5.3 (pip)
  • Python version: 3.10.12 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.10
  • Operating System: Linux-6.8.0-76060800daily20240311-generic-x86_64-with-glibc2.35

Dependencies

n/a

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

No branches or pull requests

1 participant