pombreda / formalchemy

Automatically exported from code.google.com/p/formalchemy
MIT License
0 stars 0 forks source link

wrong docstring for required method in formalchemy.fields.AbstractField #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. import formalchemy
2. help(formalchemy.fields.AbstractField.required)

Docstring for formalchemy.fields.AbstractField.required method is wrong.
Below is a patch to fix it.

=== modified file 'formalchemy/fields.py'
--- formalchemy/fields.py       2008-12-18 12:56:33 +0000
+++ formalchemy/fields.py       2008-12-06 02:53:24 +0000
@@ -672,10 +672,10 @@
         return field
     def required(self):
         """
-        Convenience method for `validate(validators.required)`. By 
-        default, NOT NULL columns are required. You can only add 
-        required-ness, not remove it.        
-       """
+        Change the label associated with this field.  By default, the
+        field name is used, modified for readability (e.g.,
+        'user_name' -> 'User name').
+        """
         return self.validate(validators.required)
     def label(self, text):
         """

Original issue reported on code.google.com by nosklo@gmail.com on 18 Dec 2008 at 1:12

GoogleCodeExporter commented 9 years ago
patch is reversed (new version to old version)! sorry for that.

attached is the correct patch (old to new)

Original comment by nosklo@gmail.com on 18 Dec 2008 at 1:24

Attachments:

GoogleCodeExporter commented 9 years ago
fixed in r615, thanks!

Original comment by jbel...@gmail.com on 18 Dec 2008 at 2:08