Creating a dock block on a class with empty (incomplete) __init__ generates the error. Write the following code:
class foo():
def __init__(self, bah)
Generate doc-block (e.g. by selecting the class name, right clicking and then executing Generate DocBlock)
Adding a colon and a pass statement makes it execute correctly.
class foo():
"""Short summary."""
def __init__(self, bah):
pass
Atom: 1.54.0 x64
Electron: 6.1.12
OS: Mac OS X 10.15.7
Thrown From: docblock-python package 0.19.1
Stack Trace
Uncaught TypeError: Cannot read property '1' of null
At ~/.atom/packages/docblock-python/lib/docblock-python.js:730
TypeError: Cannot read property '1' of null
at Object.process_class (/packages/docblock-python/lib/docblock-python.js:730:30)
at /packages/docblock-python/lib/docblock-python.js:360:29
at Array.map (<anonymous>)
at /packages/docblock-python/lib/docblock-python.js:331:12
at Object.generate_docblock (/packages/docblock-python/lib/docblock-python.js:395:10)
at HTMLElement.docblockPythonGenerate_docblock (/packages/docblock-python/lib/docblock-python.js:163:53)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:350382)
at CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:348857)
at AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:727628)
at EventEmitter.t (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:735661)
at EventEmitter.emit (events.js:200:13)
at Object.onMessage (/Applications/Atom.app/Contents/Resources/electron.asar/renderer/init.js:42:16)
Steps to Reproduce:
__init__
generates the error. Write the following code:Generate DocBlock
)Adding a colon and a
pass
statement makes it execute correctly.Atom: 1.54.0 x64 Electron: 6.1.12 OS: Mac OS X 10.15.7 Thrown From: docblock-python package 0.19.1
Stack Trace
Uncaught TypeError: Cannot read property '1' of null
Commands
Non-Core Packages