summaryrefslogtreecommitdiff
path: root/kconfiglib.py
AgeCommit message (Collapse)Author
2015-06-15Symbols are expressions too.Ulf Magnusson
2015-06-15Merge _has_modules() into _eval_expr().Ulf Magnusson
Single trivial user.
2015-06-15Simplify expression printing routines.Ulf Magnusson
Bit overengineered. Not performance-sensitive.
2015-06-15Remove 'first_expr' in _eval_expr_2().Ulf Magnusson
Dubious value and poorly named. Also rearrange cases by frequency.
2015-06-15Reflow nit.Ulf Magnusson
2015-06-15Rename go_back()/go_to_start() to unget()/unget_all().Ulf Magnusson
Bit more standard. Piggyback space nit.
2015-06-15Blank line nit.Ulf Magnusson
2015-06-15Use just .format() instead of .format() and '+'.Ulf Magnusson
2015-06-15Use a neater docstring style.Ulf Magnusson
Keeps a consistent indentation for extra lines in parameter descriptions. More compact too. Also fix parameter name documentation mismatch for Config.__getitem__().
2015-06-14Space nit.Ulf Magnusson
2015-06-14Remove redundant 'write_to_conf' assignment.Ulf Magnusson
It will be recalculated in get_value() if cached_val is None.
2015-06-14Access Choice.actual_symbols directly internally.Ulf Magnusson
Other internal details are already needed/used in those spots.
2015-06-14Remove two seldom-used expression simplifications.Ulf Magnusson
These never trigger for the x86 Kconfigs, wasting time instead.
2015-06-14Blank line nit.Ulf Magnusson
2015-06-14Clean up constructors.Ulf Magnusson
Order things consistently, make a bit more compact, add some comments.
2015-06-14allnoconfig_y line nit.Ulf Magnusson
2015-06-14Make more global constant uppercase.Ulf Magnusson
Leave the regex helper functions lowercase, as they're conceptually the same as other global functions.
2015-06-14Initialize already_written in Symbol.__init__().Ulf Magnusson
Oversight. No functional changes, but less cryptic than creating it dynamically. Also comment and rearrange a bit.
2015-06-13Bail early when a bool is selected to "m".Ulf Magnusson
It will pin it to "y", meaning it's non-modifiable. No need to go on. Maybe some common code should be extracted here too.
2015-06-13Swap some visibility conditionals.Ulf Magnusson
rev_dep == "m" is relatively rare, so check it first.
2015-06-13Simplify visibility functions.Ulf Magnusson
Not sure why I used that form the first time around.
2015-06-13Peek into more Choice internals in _parse_block().Ulf Magnusson
The parsing routines know it all re. item representations.
2015-06-13Test for int before hex in get_value().Ulf Magnusson
More common.
2015-06-13Test for hex/int before string in get_value().Ulf Magnusson
More common.
2015-06-13Use low/high instead of lower/upper when parsing range.Ulf Magnusson
Consistent with the naming in Symbol.get_value().
2015-06-13Wrap overlong line.Ulf Magnusson
2015-06-13Remove some spaces around braces.Ulf Magnusson
Matches how other bracket types work, so kinda makes sense. Also put the ':' right after the key and compactify some seldom-read/modified stuff.
2015-06-12T_IF nit.Ulf Magnusson
2015-06-12Reflow some overlong lines.Ulf Magnusson
Also compactify a bit.
2015-06-12Move _transform_n_m_y() into _eq_to_sym().Ulf Magnusson
Rename it to transform_y_m_n() for consistency.
2015-06-12Make _parse_error() messages consistent.Ulf Magnusson
2015-06-12Blank line nit.Ulf Magnusson
2015-06-12Rename cur_sym_or_choice to cur_item.Ulf Magnusson
It also handles Menus and Comments.
2015-06-12_parse_factor() style nit.Ulf Magnusson
2015-06-12Clean up and optimize _parse_factor().Ulf Magnusson
Turn into a neater if...elif...elif and check for Symbols and strings first -- much more common.
2015-06-12Remove self.m -> "m" transformation from _parse_factor().Ulf Magnusson
To be honest I can't even remember what purpose it originally served.
2015-06-12Compactify _parse_factor() slightly.Ulf Magnusson
2015-06-12Test for empty lists implicitly.Ulf Magnusson
Gives more compact bytecode, and is probably as readable in those spots at least.
2015-06-12Fix oddly formatted code.Ulf Magnusson
2015-06-12Simplify Symbol._make_conf().Ulf Magnusson
2015-06-12Rearrange Symbol._make_conf() cases.Ulf Magnusson
"y" is more common than "m", and INT and HEX are slightly more common than STRING.
2015-06-12Move assignment to 'write_to_conf' to later.Ulf Magnusson
It's always False for symbols with UNKNOWN type, so no need to re-set it. Add a comment too.
2015-06-12Remove redundant line continuations.Ulf Magnusson
2015-06-12Line length is 79 columns, not 80.Ulf Magnusson
2015-06-11Indentation nit.Ulf Magnusson
2015-06-11Use a more conventional default parameter style.Ulf Magnusson
Seems arbitrary and a tiny bit harder to read too, but maybe it's less offensive to others. :P
2015-06-11Fix typo.Ulf Magnusson
2015-06-11Rename _sep_lines() to _lines().Ulf Magnusson
2015-06-11Shorten some lines to less than 80 columns.Ulf Magnusson
Nice for vertical splits in Vim.
2015-06-11Blank line nits.Ulf Magnusson