Comments (9)
Ah, I see. Thank you for the quick response @danymat! Love this plugin btw, amazing work! 😄
from neogen.
@danymat Have you reproduced this issue? I have reproduced it.
from neogen.
Hey, it is working now!
It adds a string "binary_operator" in the Returns
part of the docstring when there's no annotation. Is that by design?
def lol(x, y):
"""
Parameters
----------
x :
y :
Returns
-------
binary_operator
"""
return x + y
It works properly when the function has an annotation for return type.
def lol(x, y) -> str:
"""
Parameters
----------
x :
y :
Returns
-------
str
"""
return x + y
I've also noticed while testing this out the *args, **kwargs
don't show up. See def module_level_function(param1, param2=None, *args, **kwargs): in the Sphinx's NumPy style Python docstrings. Should I create a new issue for this or is it fine here?
def lol(x, y, *args, **kwargs) -> str:
"""
Parameters
----------
x :
y :
Returns
-------
str
"""
return x + y
from neogen.
Hello, you can reference your two problems in a new issue !
I am closing this issue as it seems resolved
from neogen.
Hello, can I see your neogen config ?
Did you called the setup()
function ?
from neogen.
Here's my neogen config-
-- load neogen
local is_neogen_installed, neogen = pcall(require, "neogen")
if not is_neogen_installed then
vim.notify("neogen is not installed.")
return
end
local opts = { noremap = true, silent = true }
local keymap = vim.api.nvim_set_keymap
keymap("n", "<Leader>gg", ":lua require('neogen').generate()<CR>", opts)
neogen.setup({
enabled = true,
languages = {
python = {
template = {
annotation_convention = "numpydoc",
},
},
},
})
Here's how I installed it.
use({
"danymat/neogen",
requires = "nvim-treesitter/nvim-treesitter",
})
I'm running neovim 0.6.1 and the latest version of neogen.
from neogen.
Hello, it seems that latest refactor did cause some bugs in that regard
(cc @kevinhwang91) Seems to be the setmetatable
in configuration that is not called:
- here:
neogen/lua/neogen/generator.lua
Lines 163 to 170 in e5031f4
- even here:
Line 146 in e5031f4
Can you take a look?.
I will try to come up a fix quickly today if @kevinhwang91 is not active
from neogen.
Please try #67
from neogen.
Hello, i merged the fix @kevinhwang91 did, can you try out ?
from neogen.
Related Issues (20)
- Incorrect parameter list in Python HOT 2
- Have you ever thought about introducing ChatGPT as a document generation engine, just like Mintify Writer? HOT 1
- Python bug - nested functions should not have their first parameter removed
- Empty types in jsdoc HOT 4
- Highlight groups of block after docstring changes after completion of final choice node HOT 1
- This structure cannot generate annotations through neogen
- Module 'neogen.types.template' not found
- Feature Request - Support NeoVim native snippet engine HOT 2
- `Invalid 'end_col': out of range` error whenever running `Neogen file` HOT 2
- Bug: handling of arbitrary args and kwargs with type hints HOT 1
- Allow generating explicit sections HOT 3
- Update / Correction command HOT 2
- Python - raise module_name.Error() is not detected
- Bug: Neogen not functioning in vue files. HOT 2
- Could not get neogen to work with LazyVim HOT 4
- Need unittests HOT 1
- Missing blank line in numpydoc
- Option to always disable writing argument types in Python HOT 2
- FR: support creating annotations in Markdown code blocks HOT 1
- Sometimes native snippets do not expand on tab
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neogen.