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

remove request.website #386

Merged
merged 6 commits into from
Oct 3, 2014
Merged

remove request.website #386

merged 6 commits into from
Oct 3, 2014

Conversation

chadwhitacre
Copy link
Contributor

Builds on #385.

I'm trying to get rid of request.website, so that instead we just pass
in the website object where ever we need it. In simplate contexts,
website is available as a global. It's unpythonic ("one right way") and
overcomplicated to have it also available at request.website.
We have website already in simplate contexts.
Pass in website object instead.
@chadwhitacre chadwhitacre mentioned this pull request Oct 3, 2014
@pjz
Copy link
Contributor

pjz commented Oct 3, 2014

So... I really hate reformatting patches because they obscure the actual trail of who made what actual code changes.

@chadwhitacre
Copy link
Contributor Author

@pjz So what's the solution? You want to include reformatting changes in with other changes? I've usually considered that an antipattern as well since it makes it harder to see the "real" changes in a commit.

@chadwhitacre
Copy link
Contributor Author

If you want to commit the 100-char reformat, I'm happy to rebase #387 on master once that's landed.

@pjz
Copy link
Contributor

pjz commented Oct 3, 2014

Yeah, if you need to reformat, do so iff you're already changing that line. That way, all changes are real, substantive changes, so if later there's a bug in that line, 'git blame' will have the correct answer to 'who wrote that line of code', which it won't if you reformat everything.

@chadwhitacre
Copy link
Contributor Author

@pjz Okay, that makes it more important to format code correctly in the first place. ;-)

@pjz
Copy link
Contributor

pjz commented Oct 3, 2014

Yeah. Honestly, this is a problem that should be solved via a git hook that rejects incorrectly-formatted commits (where 'incorrectly-formatted' is defined as 'not matching the output of that source code run through the prettyprinter with agreed-upon settings') so that everything is both well formatted and correctly attributed. Golang does this, I think. I haven't seen corresponding python examples..

@chadwhitacre
Copy link
Contributor Author

Closing in favor of #387.

@chadwhitacre chadwhitacre changed the title format dispatcher for 100-char lines remove request.website Oct 3, 2014
@chadwhitacre
Copy link
Contributor Author

Actually, leaving open but retitling.

@pjz
Copy link
Contributor

pjz commented Oct 3, 2014

Can you also back out the dispatcher reformatting?

@pjz
Copy link
Contributor

pjz commented Oct 3, 2014

nevermind, I'll just make you fix it if it breaks :)

pjz added a commit that referenced this pull request Oct 3, 2014
@pjz pjz merged commit 7dba20a into master Oct 3, 2014
@chadwhitacre chadwhitacre deleted the format-for-100 branch October 3, 2014 18:35
@chadwhitacre
Copy link
Contributor Author

:-)

@chadwhitacre chadwhitacre mentioned this pull request Oct 3, 2014
Changaco pushed a commit that referenced this pull request Mar 11, 2016
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

Successfully merging this pull request may close these issues.

2 participants